Fix use of --ask-vault-pass argument
Currently, this argument does not work correctly, since the vault password is not passed to kayobe via $KAYOBE_VAULT_PASSWORD, meaning that it cannot update the kolla-ansible passwords.yml file. It also works non-optimally, since every invocation of ansible-playbook will prompt for a password. This change fixes the issue by prompting for a password once in the kayobe CLI, and storing the password in the $KAYOBE_VAULT_PASSWORD environment variable. The kayobe-vault-password-helper command is then used as the --vault-password-file to ansible-playbook, and the helper pulls the password out of the environment. Change-Id: I88b1b7b9e9be15b52e730d353ce1b1a6feacceb8 Story: 2001664 Task: 27009
Showing
- kayobe/ansible.py 3 additions, 15 deletionskayobe/ansible.py
- kayobe/kolla_ansible.py 6 additions, 3 deletionskayobe/kolla_ansible.py
- kayobe/tests/unit/test_ansible.py 20 additions, 25 deletionskayobe/tests/unit/test_ansible.py
- kayobe/tests/unit/test_kolla_ansible.py 31 additions, 9 deletionskayobe/tests/unit/test_kolla_ansible.py
- kayobe/tests/unit/test_vault.py 104 additions, 0 deletionskayobe/tests/unit/test_vault.py
- kayobe/vault.py 91 additions, 10 deletionskayobe/vault.py
- releasenotes/notes/ask-vault-pass-b6ced0220384dde1.yaml 7 additions, 0 deletionsreleasenotes/notes/ask-vault-pass-b6ced0220384dde1.yaml
Loading
Please register or sign in to comment