Make inventory file writable
Looks like ansible_runner.utils.dump_artifact() makes it read-only and redeploy fails with permission error. Closes-Bug: #1950767 Change-Id: I32acdb51ac12be08c94efa5c198ea83549a8f034
This commit is contained in:
parent
98e692d00f
commit
6b2892508a
|
@ -363,11 +363,12 @@ def run_ansible_playbook(playbook, inventory, workdir, playbook_dir=None,
|
|||
inventory,
|
||||
default_flow_style=False
|
||||
)
|
||||
return ansible_runner.utils.dump_artifact(
|
||||
inv_file = ansible_runner.utils.dump_artifact(
|
||||
inventory,
|
||||
workdir,
|
||||
constants.ANSIBLE_HOSTS_FILENAME
|
||||
)
|
||||
constants.ANSIBLE_HOSTS_FILENAME)
|
||||
os.chmod(inv_file, 0o600)
|
||||
return inv_file
|
||||
|
||||
def _running_ansible_msg(playbook, timeout=None):
|
||||
if timeout and timeout > 0:
|
||||
|
|
Loading…
Reference in New Issue