Skip to content

Commit

Permalink
Fix aws_sm arg name
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-at-luther committed Sep 4, 2024
1 parent d37d282 commit d1874e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/luther_ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def _vault_encrypt(self, secret, encryption_key):
def _get_encryption_key(self, args):
if args.az_vault:
return keyvault.get_azure_secret(args.az_vault, args.az_vault_key)
if args.aws_sm:
if args.aws_sm_secret_id:
return keyvault.get_aws_secret(args.aws_sm_secret_id, args.aws_region)
# fall back to password file
return self._ansible_vault_encryption_key()
Expand Down Expand Up @@ -236,7 +236,7 @@ def _ansible_vault_encryption_key(self):
def _ansible_vault_args(self, args):
if args.az_vault:
return ["--vault-id", "/opt/mars/vault-az-keyvault.py"]
if args.aws_sm:
if args.aws_sm_secret_id:
return ["--vault-id", "/opt/mars/vault-aws-secretsmanager.py"]
if self.vault_password_file is None:
self.vault_password_file = self._find_ansible_vault_password_file()
Expand Down Expand Up @@ -323,7 +323,7 @@ def _add_env_vars(args):
"AZ_KEYVAULT_NAME": args.az_vault,
"AZ_KEYVAULT_KEY": args.az_vault_key,
}
if args.aws_sm:
if args.aws_sm_secret_id:
return {
"AWS_SM_SECRET_ID": args.aws_sm_secret_id,
"AWS_REGION": args.aws_region,
Expand Down

0 comments on commit d1874e9

Please sign in to comment.