Set become method via variable
infra/host-provisioner/pipeline/head This commit looks good
Details
infra/host-provisioner/pipeline/head This commit looks good
Details
It seems like setting the `ansible_become_method` variable as a group variable overrides the `--become-method` CLI argument. If we set the variable on the command line, that _should_ take precedence.
parent
d860a25986
commit
115d8601f6
|
@ -63,7 +63,7 @@ def amqp_connect() -> pika.BlockingConnection:
|
|||
|
||||
|
||||
def apply_playbook(*args: str) -> None:
|
||||
cmd = ['ansible-playbook', '-u', 'root', '--become-method', 'su']
|
||||
cmd = ['ansible-playbook', '-u', 'root', '-e' 'ansible_become_method', 'su']
|
||||
cmd += args
|
||||
log.debug('Running command: %s', cmd)
|
||||
subprocess.run(cmd, check=True, stdin=subprocess.DEVNULL)
|
||||
|
|
Loading…
Reference in New Issue