Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nocturnalastro committed Mar 25, 2024
1 parent 8c5e110 commit e24352b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions playbooks/populate_registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- name: Play to populate image_hashes for relevant images
hosts: localhost
gather_facts: (setup_registry_service | default(true)) | bool
gather_facts: false
vars:
destination_hosts:
- registry_host
Expand All @@ -19,10 +19,14 @@

- name: Play populate mirror registry
hosts: registry_host
gather_facts: "{{ (setup_registry_service | default(true)) | bool }}"
gather_facts: false
vars:
config_file_path: /tmp/wip/config
SETUP_REGISTRY_SERVICE: "{{ setup_registry_service | default(true)}}"
pre_tasks:
- name: Setup facts
ansible.builtin.setup:
when: SETUP_REGISTRY_SERVICE | bool
roles:
- role: redhatci.ocp.populate_mirror_registry
when: SETUP_REGISTRY_SERVICE | bool
6 changes: 3 additions & 3 deletions roles/validate_inventory/tasks/network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
# 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.
- name: Ensure baremetal node BMCs are reachable
shell: # noqa 305
shell: # noqa command-instead-of-shell
cmd: "ping -c 1 -W 2 {{ hostvars[item]['bmc_ip'] | default(hostvars[item]['bmc_address']) }}"
changed_when: False
when: hostvars[item]['vendor'] | lower != 'kvm'
loop: "{{ groups['nodes'] }}"

- name: Ensure service hosts are reachable
shell: # noqa 305
shell: # noqa command-instead-of-shell
cmd: "ping -c 1 -W 2 {{ hostvars[item]['ansible_host'] }}"
changed_when: False
loop: "{{ groups['services'] }}"

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

0 comments on commit e24352b

Please sign in to comment.