aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Rostecki <michal.rostecki@gmail.com>2016-03-31 20:48:08 +0200
committerMichal Rostecki <michal.rostecki@gmail.com>2016-04-01 07:57:14 +0200
commit5aa2dcce3089d08a46175513fecb55ce91004769 (patch)
tree3657bb836ebcd8d54a4124912a1f5c3578b5ff00
parent834b5eff5c1e3768fdc829128cae0b0955420bcd (diff)
downloadkolla-5aa2dcce3089d08a46175513fecb55ce91004769.tar.gz
kolla-5aa2dcce3089d08a46175513fecb55ce91004769.zip
Fix IP resolve check for RabbitMQ on AIO
On AIO installation we cannot assume that the public IP address will be the first entry in "getent ahostsv4" result, because it may be also a localhost address. To make this check positive in AIO, we should look for the public IP in the whole output. Change-Id: I1da7b95d7f00c7f87ff68ead46bf55fdea812599 Closes-Bug: 1564564
-rw-r--r--ansible/roles/rabbitmq/tasks/bootstrap.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/ansible/roles/rabbitmq/tasks/bootstrap.yml b/ansible/roles/rabbitmq/tasks/bootstrap.yml
index 01083ea54..5ee091a4a 100644
--- a/ansible/roles/rabbitmq/tasks/bootstrap.yml
+++ b/ansible/roles/rabbitmq/tasks/bootstrap.yml
@@ -7,7 +7,7 @@
- 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 }}'"
+ when: "'{{ hostvars[item['item']]['ansible_' + hostvars[item['item']]['api_interface']]['ipv4']['address'] }}' not in '{{ item.stdout }}'"
- name: Creating rabbitmq volume
kolla_docker: