-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lxd_connection: Allow non-root users to connect to an instance (#9659)
* fix: add support for non-root user * fix: show correct info for connection * fix: use build_exec_command to execute as nonroot * unset default user * feat: add options for setting remote user and become method * fix: add root as default remote_user * fix: remove ansible_ssh_user from remote_user vars * fix: use single quotes inside f-string * fix: ensure lxc exec comes first * fix: line length * fix: use -c flag with su * Update plugins/connection/lxd.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/connection/lxd.py Co-authored-by: Felix Fontein <[email protected]> * Update plugins/connection/lxd.py Co-authored-by: Felix Fontein <[email protected]> * doc: add changelog fragment * fix: use underscore for module name in fragment * Update 9659-lxd_connection-nonroot-user.yml Co-authored-by: Felix Fontein <[email protected]> * fix: add put command * feat: add get_remote_uid_gid placeholder function * feat: complete placeholder _get_remote_uid_gid function * fix: better logging * fix: ensure default values are of type str * fix: use ints for uid and gid * fix: print put command * fix: format * fix: display msg for PUT * fix: add comment about defaults * fix: format * fix: use os module to get uid and gid * Revert "fix: use os module to get uid and gid" This reverts commit bb2ba14. * Update plugins/connection/lxd.py Co-authored-by: Felix Fontein <[email protected]> * fix: omit uid, gid args in lxd file push if root --------- Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit 06df717)
- Loading branch information
1 parent
fa846e9
commit f49e6a1
Showing
2 changed files
with
98 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
minor_changes: | ||
- lxd connection plugin - adds ``remote_user`` and ``lxd_become_method`` parameters for allowing a non-root user to connect to an LXD instance (https://github.com/ansible-collections/community.general/pull/9659). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters