diff options
| author | Jenkins <jenkins@review.openstack.org> | 2016-08-26 19:04:42 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2016-08-26 19:04:42 +0000 |
| commit | 8874c69beb257755da2ced53cbba088acb75a1bd (patch) | |
| tree | 10bbfa317716f6b1f12a7c34c1e9a8448c90f3c0 | |
| parent | 42bd52037e1c0b136186e6f55f5c36341f1fe223 (diff) | |
| parent | 6c238ca3bfc082813252098735e3fd6062ad952e (diff) | |
| download | kolla-8874c69beb257755da2ced53cbba088acb75a1bd.tar.gz kolla-8874c69beb257755da2ced53cbba088acb75a1bd.zip | |
Merge "Move rabbitmq precheck from start"
| -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" |
