diff options
| author | Franciszek Przewozny <przewozny.franciszek@gmail.com> | 2026-09-01 22:16:14 +0200 |
|---|---|---|
| committer | Franciszek Przewoźny <przewozny.franciszek@gmail.com> | 2026-09-16 19:08:14 +0000 |
| commit | 8d5cc5ef66b140fb1f2c1b03d57c9c85f457b1af (patch) | |
| tree | 2dfbbc7160d9b550ed9ab7e8066906d507596cc2 /ansible/roles | |
| parent | fab0967e3f737ebf78f3c1de897bdf1b837c0b83 (diff) | |
| download | kolla-ansible-8d5cc5ef66b140fb1f2c1b03d57c9c85f457b1af.tar.gz kolla-ansible-8d5cc5ef66b140fb1f2c1b03d57c9c85f457b1af.zip | |
prometheus: accept vault-encrypted values in precheck
Ansible's "is string" Jinja test returns False for values encrypted
with ansible-vault (AnsibleVaultEncryptedUnicode), so a precheck
using such an encrypted password/salt failed incorrectly. Accept the
value if it is either a plain string or vault_encrypted.
Closes-Bug: #2115495
Change-Id: I0bf783c40ca5be66717193be9dece971805fca55
Signed-off-by: fprzewozn <przewozny.franciszek@gmail.com>
(cherry picked from commit ed74de7e9a76fac01554fc876c4a581b857903ea)
Diffstat (limited to 'ansible/roles')
| -rw-r--r-- | ansible/roles/prometheus/tasks/precheck.yml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ansible/roles/prometheus/tasks/precheck.yml b/ansible/roles/prometheus/tasks/precheck.yml index d4bdf0eba..5b98a09b4 100644 --- a/ansible/roles/prometheus/tasks/precheck.yml +++ b/ansible/roles/prometheus/tasks/precheck.yml @@ -28,21 +28,21 @@ ansible.builtin.assert: that: - prometheus_bcrypt_salt is defined - - prometheus_bcrypt_salt is string + - prometheus_bcrypt_salt is string or prometheus_bcrypt_salt is vault_encrypted - prometheus_bcrypt_salt | length == 22 - name: Check that prometheus_password is correctly set ansible.builtin.assert: that: - prometheus_password is defined - - prometheus_password is string + - prometheus_password is string or prometheus_password is vault_encrypted - prometheus_password | length > 0 - name: Check that prometheus_grafana_password is correctly set ansible.builtin.assert: that: - prometheus_grafana_password is defined - - prometheus_grafana_password is string + - prometheus_grafana_password is string or prometheus_grafana_password is vault_encrypted - prometheus_grafana_password | length > 0 when: enable_grafana | bool @@ -50,7 +50,7 @@ ansible.builtin.assert: that: - prometheus_skyline_password is defined - - prometheus_skyline_password is string + - prometheus_skyline_password is string or prometheus_skyline_password is vault_encrypted - prometheus_skyline_password | length > 0 when: enable_skyline | bool |
