Skip to content

Commit

Permalink
Merge pull request #78 from stackhpc/upstream/wallaby-2022-11-07
Browse files Browse the repository at this point in the history
Synchronise wallaby with upstream
  • Loading branch information
markgoddard authored Nov 7, 2022
2 parents 9169e71 + 7ab1de3 commit 66457eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ansible/roles/kolla-ansible/library/kolla_passwords.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ def vault_encrypt(module, file_path):

def vault_decrypt(module, file_path):
"""Decrypt a file using Ansible vault"""

# Return immediately if file not encrypted
with open(file_path, 'r') as f:
if not f.readline()[:15] == "$ANSIBLE_VAULT;":
return

password_path = create_vault_password_file(module)
try:
cmd = ["ansible-vault", "decrypt",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
fixes:
- |
Fixes an error when generating passwords.yml if an unencrypted file exists
but a password has been supplied.

0 comments on commit 66457eb

Please sign in to comment.