Merge "Add check if all the hostnames are resolvable"
This commit is contained in:
commit
fa2b14a69a
@ -1,4 +1,14 @@
|
||||
---
|
||||
- name: Check if all rabbit hostnames are resolvable
|
||||
command: "getent hosts {{ hostvars[item]['ansible_hostname'] }}"
|
||||
changed_when: false
|
||||
register: rabbitmq_hostnames
|
||||
with_items: groups['rabbitmq']
|
||||
|
||||
- fail: msg="Hostname has to resolve to IP address of api_interface"
|
||||
with_items: rabbitmq_hostnames.results
|
||||
when: "{% set ip=item.stdout.split(' ')[0] %}'{{ hostvars[item['item']]['ansible_' + hostvars[item['item']]['api_interface']]['ipv4']['address'] }}' != '{{ ip }}'"
|
||||
|
||||
- name: Creating rabbitmq volume
|
||||
kolla_docker:
|
||||
action: "create_volume"
|
||||
|
Loading…
x
Reference in New Issue
Block a user