fix: update preflight checks
This commit is contained in:
parent
a8faaeb21f
commit
962af038cf
@ -259,7 +259,7 @@
|
||||
when: vault_port_results.results | length > 0
|
||||
|
||||
- name: "Checking if consul ports are available"
|
||||
when: inventory_hostname in groups['consul_servers']
|
||||
when: inventory_hostname in groups['consul_servers'] or inventory_hostname in groups['consul_agents']
|
||||
block:
|
||||
- name: "Checking if consul ports are available"
|
||||
ansible.builtin.wait_for:
|
||||
@ -278,6 +278,26 @@
|
||||
with_items: "{{ consul_port_results.results }}"
|
||||
when: consul_port_results.results | length > 0
|
||||
|
||||
- name: "Checking if nomad ports are available"
|
||||
when: inventory_hostname in groups['nomad_servers'] or inventory_hostname in groups['nomad_clients']
|
||||
block:
|
||||
- name: "Checking if nomad ports are available"
|
||||
ansible.builtin.wait_for:
|
||||
host: "{{ inventory_hostname }}"
|
||||
port: "{{ item }}"
|
||||
state: "stopped"
|
||||
timeout: 5
|
||||
loop: "{{ nomad_required_ports }}"
|
||||
ignore_errors: true
|
||||
register: nomad_port_results
|
||||
|
||||
- name: "Assert that nomad ports are not currently in use"
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- item.failed == false
|
||||
with_items: "{{ nomad_port_results.results }}"
|
||||
when: nomad_port_results.results | length > 0
|
||||
|
||||
- name: "Checking if system uses systemd"
|
||||
become: true
|
||||
ansible.builtin.assert:
|
||||
|
Loading…
Reference in New Issue
Block a user