Skip to content

Commit 5de4fae

Browse files
committed
Improve prechecks for ssh_key, vault_password, vxlan_vni
1 parent 0e10965 commit 5de4fae

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

ansible/deploy-openstack-config.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,30 @@
1111
- ssh_key_path != None
1212
fail_msg: "Please provide a path to the SSH key used within the multinode environment."
1313

14+
- name: Verify ssh key exists
15+
ansible.builtin.assert:
16+
that:
17+
- ssh_key_path | expanduser is exists
18+
fail_msg: "Could not find SSH key at {{ ssh_key_path | expanduser }}"
19+
20+
- name: Verify vault password path has been set
21+
ansible.builtin.assert:
22+
that:
23+
- vault_password_path != None
24+
fail_msg: "Please provide a path to the vault password used within the multinode environment."
25+
26+
- name: Verify vault password exists
27+
ansible.builtin.assert:
28+
that:
29+
- vault_password_path | expanduser is exists
30+
fail_msg: "Could not find vault password at {{ vault_password_path | expanduser }}"
31+
1432
- name: Verify VXLAN VNI has been set
1533
ansible.builtin.assert:
1634
that:
1735
- vxlan_vni != None
36+
- vxlan_vni | int > 0
37+
- vxlan_vni | int <= 100000
1838
fail_msg: "Please provide a VXLAN VNI. A unique value from 1 to 100,000."
1939

2040
- name: Gather facts about the host

0 commit comments

Comments
 (0)