mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-07 03:00:33 -07:00
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 <felix@fontein.de> * Update plugins/connection/lxd.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/connection/lxd.py Co-authored-by: Felix Fontein <felix@fontein.de> * doc: add changelog fragment * fix: use underscore for module name in fragment * Update 9659-lxd_connection-nonroot-user.yml Co-authored-by: Felix Fontein <felix@fontein.de> * 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 commitbb2ba14b8f
. * Update plugins/connection/lxd.py Co-authored-by: Felix Fontein <felix@fontein.de> * fix: omit uid, gid args in lxd file push if root --------- Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit06df717bc6
) Co-authored-by: Peter Siegel <33677897+yeetypete@users.noreply.github.com>
2 lines
230 B
YAML
2 lines
230 B
YAML
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).
|