Skip to content

Commit a211eaa

Browse files
committed
Add safety check for migration playbooks
1 parent b28469b commit a211eaa

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

etc/kayobe/ansible/secret-store/vault-bao-migration-overcloud.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
secret_store_bind_address: "{{ ansible_facts[secret_store_bind_interface].ipv4.address }}"
99
secret_store_api_address: "https://{{ secret_store_bind_address }}:8200"
1010
tasks:
11+
- name: Fail if secret store is already configured to be OpenBao
12+
fail:
13+
msg: Please check if OpenBao is already running on the host.
14+
If it's not, please set the variable 'stackhpc_ca_secret_store' to 'vault'
15+
when: stackhpc_ca_secret_store == "openbao"
16+
1117
- name: Set a fact about the virtualenv on the remote system
1218
ansible.builtin.set_fact:
1319
virtualenv: "{{ ansible_python_interpreter | dirname | dirname }}"

etc/kayobe/ansible/secret-store/vault-bao-migration-seed.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
secret_store_bind_address: "{{ ansible_facts[secret_store_bind_interface].ipv4.address }}"
99
secret_store_api_address: "http://{{ secret_store_bind_address }}:8200"
1010
tasks:
11+
- name: Fail if secret store is already configured to be OpenBao
12+
fail:
13+
msg: Please check if OpenBao is already running on the host.
14+
If it's not, please set the variable 'stackhpc_ca_secret_store' to 'vault'
15+
when: stackhpc_ca_secret_store == "openbao"
16+
1117
- name: Set a fact about the virtualenv on the remote system
1218
ansible.builtin.set_fact:
1319
virtualenv: "{{ ansible_python_interpreter | dirname | dirname }}"

0 commit comments

Comments
 (0)