mirror of
https://github.com/containers/ansible-podman-collections.git
synced 2026-02-04 07:11:49 +00:00
Signed-off-by: Janos Gerzson <gerzsonj@gmail.com> Signed-off-by: Janos Gerzson <gerzsonj@gmail.com>
This commit is contained in:
parent
73af4896b4
commit
e39439831f
1 changed files with 3 additions and 4 deletions
|
|
@ -17,8 +17,7 @@ DOCUMENTATION = """
|
|||
version_added: 1.9.0
|
||||
options:
|
||||
become_user:
|
||||
description: User you 'become' to execute the task
|
||||
default: root
|
||||
description: User you 'become' to execute the task ('root' is not a valid value here).
|
||||
ini:
|
||||
- section: privilege_escalation
|
||||
key: become_user
|
||||
|
|
@ -130,8 +129,8 @@ class BecomeModule(BecomeBase):
|
|||
|
||||
becomecmd = 'podman unshare'
|
||||
|
||||
user = self.get_option('become_user') or ''
|
||||
if user:
|
||||
user = self.get_option('become_user') or 'root'
|
||||
if user != 'root':
|
||||
cmdlist = [self.get_option('become_exe') or 'sudo']
|
||||
# -i is required, because
|
||||
# podman unshare should be executed in a login shell to avoid chdir permission errors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue