Merge "Refactor NSS database var"
This commit is contained in:
commit
bcbcee90d0
@ -17,19 +17,9 @@
|
|||||||
- container_facts['qdrouterd'] is not defined
|
- container_facts['qdrouterd'] is not defined
|
||||||
- inventory_hostname in groups['qdrouterd']
|
- inventory_hostname in groups['qdrouterd']
|
||||||
|
|
||||||
- name: Set NSS database for IPv4
|
|
||||||
set_fact:
|
|
||||||
nss_database: 'ahostsv4'
|
|
||||||
when:
|
|
||||||
- api_address_family == 'ipv4'
|
|
||||||
|
|
||||||
- name: Set NSS database for IPv6
|
|
||||||
set_fact:
|
|
||||||
nss_database: 'ahostsv6'
|
|
||||||
when:
|
|
||||||
- api_address_family == 'ipv6'
|
|
||||||
|
|
||||||
- name: Check if all qdrouterd hostnames are resolvable
|
- name: Check if all qdrouterd hostnames are resolvable
|
||||||
|
vars:
|
||||||
|
nss_database: "{{ 'ahostsv4' if api_address_family == 'ipv4' else 'ahostsv6' }}"
|
||||||
command: "getent {{ nss_database }} {{ hostvars[item]['ansible_hostname'] }}"
|
command: "getent {{ nss_database }} {{ hostvars[item]['ansible_hostname'] }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: qdrouterd_hostnames
|
register: qdrouterd_hostnames
|
||||||
|
@ -51,19 +51,9 @@
|
|||||||
- container_facts['rabbitmq'] is not defined
|
- container_facts['rabbitmq'] is not defined
|
||||||
- inventory_hostname in groups['rabbitmq']
|
- inventory_hostname in groups['rabbitmq']
|
||||||
|
|
||||||
- name: Set NSS database for IPv4
|
|
||||||
set_fact:
|
|
||||||
nss_database: 'ahostsv4'
|
|
||||||
when:
|
|
||||||
- api_address_family == 'ipv4'
|
|
||||||
|
|
||||||
- name: Set NSS database for IPv6
|
|
||||||
set_fact:
|
|
||||||
nss_database: 'ahostsv6'
|
|
||||||
when:
|
|
||||||
- api_address_family == 'ipv6'
|
|
||||||
|
|
||||||
- name: Check if all rabbit hostnames are resolvable
|
- name: Check if all rabbit hostnames are resolvable
|
||||||
|
vars:
|
||||||
|
nss_database: "{{ 'ahostsv4' if api_address_family == 'ipv4' else 'ahostsv6' }}"
|
||||||
command: "getent {{ nss_database }} {{ hostvars[item]['ansible_hostname'] }}"
|
command: "getent {{ nss_database }} {{ hostvars[item]['ansible_hostname'] }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: rabbitmq_hostnames
|
register: rabbitmq_hostnames
|
||||||
@ -119,6 +109,8 @@
|
|||||||
- container_facts['outward_rabbitmq'] is not defined
|
- container_facts['outward_rabbitmq'] is not defined
|
||||||
|
|
||||||
- name: Check if all outward rabbit hostnames are resolvable
|
- name: Check if all outward rabbit hostnames are resolvable
|
||||||
|
vars:
|
||||||
|
nss_database: "{{ 'ahostsv4' if api_address_family == 'ipv4' else 'ahostsv6' }}"
|
||||||
command: "getent {{ nss_database }} {{ hostvars[item]['ansible_hostname'] }}"
|
command: "getent {{ nss_database }} {{ hostvars[item]['ansible_hostname'] }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: outward_rabbitmq_hostnames
|
register: outward_rabbitmq_hostnames
|
||||||
|
Loading…
Reference in New Issue
Block a user