diff options
| author | Paul Bourke <paul.bourke@oracle.com> | 2016-08-26 16:18:04 +0100 |
|---|---|---|
| committer | Paul Bourke <paul.bourke@oracle.com> | 2016-08-26 16:18:04 +0100 |
| commit | 6c238ca3bfc082813252098735e3fd6062ad952e (patch) | |
| tree | 079620b3f606d8f2aba81be6dc0e4480f7a5ad24 | |
| parent | ca100f1f3206daf5aeccaa58bad5b97ef22f4e30 (diff) | |
| download | kolla-6c238ca3bfc082813252098735e3fd6062ad952e.tar.gz kolla-6c238ca3bfc082813252098735e3fd6062ad952e.zip | |
Move rabbitmq precheck from start
rabbitmq's start task contains a precheck. This should be part of the
other prechecks for consistency
TrivialFix
Change-Id: I7728ec3f5be3248424d74a4387925b72114b8943
| -rw-r--r-- | ansible/roles/prechecks/tasks/port_checks.yml | 10 | ||||
| -rw-r--r-- | ansible/roles/rabbitmq/tasks/bootstrap.yml | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/ansible/roles/prechecks/tasks/port_checks.yml b/ansible/roles/prechecks/tasks/port_checks.yml index 7f8724aae..91a0305a3 100644 --- a/ansible/roles/prechecks/tasks/port_checks.yml +++ b/ansible/roles/prechecks/tasks/port_checks.yml @@ -343,6 +343,16 @@ state: stopped when: inventory_hostname in groups['rabbitmq'] +- name: Check if all rabbit hostnames are resolvable + command: "getent ahostsv4 {{ 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: "'{{ hostvars[item['item']]['ansible_' + hostvars[item['item']]['api_interface']]['ipv4']['address'] }}' not in '{{ item.stdout }}'" + - name: Checking free port for Mongodb wait_for: host: "{{ hostvars[inventory_hostname]['ansible_' + api_interface]['ipv4']['address'] }}" diff --git a/ansible/roles/rabbitmq/tasks/bootstrap.yml b/ansible/roles/rabbitmq/tasks/bootstrap.yml index d95c41749..e5a5eb97d 100644 --- a/ansible/roles/rabbitmq/tasks/bootstrap.yml +++ b/ansible/roles/rabbitmq/tasks/bootstrap.yml @@ -1,14 +1,4 @@ --- -- name: Check if all rabbit hostnames are resolvable - command: "getent ahostsv4 {{ 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: "'{{ hostvars[item['item']]['ansible_' + hostvars[item['item']]['api_interface']]['ipv4']['address'] }}' not in '{{ item.stdout }}'" - - name: Creating rabbitmq volume kolla_docker: action: "create_volume" |
