Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change some checks to acommodate for clients where ICMP is disabled by firewall #287

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roles/validate_inventory/tasks/cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
quiet: true
fail_msg: "Node {{ item }} must have either bmc_ip"
loop: "{{ groups['nodes'] }}"
when: hostvars[item]['vendor'] | lower != 'pxe'

- name: Assert bmc_ip is correct type
assert:
Expand Down
7 changes: 4 additions & 3 deletions roles/validate_inventory/tasks/network.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
# Node `ansible_host`s are not pinged. They are not required to be running at this stage.
# KVM node BMCs are not checked, the vm_host will be pinged later.
# PXE node BMCs are not checked because it is not required
- name: Ensure baremetal node BMCs are reachable
shell: # noqa 305
cmd: "ping -c 1 -W 2 {{ hostvars[item]['bmc_ip'] | default(hostvars[item]['bmc_address']) }}"
cmd: "nc -vz -u {{ hostvars[item]['bmc_ip'] | default(hostvars[item]['bmc_address']) }}"
changed_when: False
when: hostvars[item]['vendor'] | lower != 'kvm'
when: (hostvars[item]['vendor'] | lower != 'kvm') and (hostvars[item]['vendor'] | lower != 'pxe')
loop: "{{ groups['nodes'] }}"

- name: Ensure service hosts are reachable
Expand All @@ -16,6 +17,6 @@

- name: Ensure NTP server is available if not being set up
shell: # noqa 305
cmd: "ping -c 1 -W 2 {{ ntp_server }}"
cmd: "nc -vz -u {{ ntp_server }}"
changed_when: False
when: (setup_ntp_service | default(True)) != True
Loading