Skip to content

Commit

Permalink
Append --vault-id to ansible runner command
Browse files Browse the repository at this point in the history
Add --vault-id [email protected] to the command line arguments if 'cmdline' exists in runner_args. This ensures the vault ID is always passed for secure password management.
  • Loading branch information
SquirrelDevelopper committed Oct 15, 2024
1 parent 6749ad4 commit 03790c7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/src/ansible/ssm-ansible-run.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ def execute():
runner_args['cmdline'] += ' --diff'
else:
runner_args['cmdline'] = '--diff'
if 'cmdline' in runner_args:
runner_args['cmdline'] += ' --vault-id [email protected]'

thread_obj, runner_obj = ansible_runner.run_async(**runner_args)
sys.stdout.write(runner_obj.config.ident)
Expand Down

0 comments on commit 03790c7

Please sign in to comment.