Refactor NSS database var
IPv6 control plane implementation [1] follow-up. [1] Ia34e6916ea4f99e9522cd2ddde03a0a4776f7e2c Change-Id: I4c2bd81e77fc09a04838a62f008e5d6c5dc1483d
This commit is contained in:
parent
e7a85726d2
commit
75862bc751
@ -17,19 +17,9 @@
|
||||
- container_facts['qdrouterd'] is not defined
|
||||
- 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
|
||||
vars:
|
||||
nss_database: "{{ 'ahostsv4' if api_address_family == 'ipv4' else 'ahostsv6' }}"
|
||||
command: "getent {{ nss_database }} {{ hostvars[item]['ansible_hostname'] }}"
|
||||
changed_when: false
|
||||
register: qdrouterd_hostnames
|
||||
|
@ -51,19 +51,9 @@
|
||||
- container_facts['rabbitmq'] is not defined
|
||||
- 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
|
||||
vars:
|
||||
nss_database: "{{ 'ahostsv4' if api_address_family == 'ipv4' else 'ahostsv6' }}"
|
||||
command: "getent {{ nss_database }} {{ hostvars[item]['ansible_hostname'] }}"
|
||||
changed_when: false
|
||||
register: rabbitmq_hostnames
|
||||
@ -119,6 +109,8 @@
|
||||
- container_facts['outward_rabbitmq'] is not defined
|
||||
|
||||
- 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'] }}"
|
||||
changed_when: false
|
||||
register: outward_rabbitmq_hostnames
|
||||
|
Loading…
Reference in New Issue
Block a user