From 4738c75ab3a3ee5d76c089ef9fc3ac0002eebd16 Mon Sep 17 00:00:00 2001 From: Duong Ha-Quang Date: Fri, 2 Jun 2017 10:36:54 +0700 Subject: [PATCH] Fix rabbitmq prechecks broken due to Ansible upgrade In Ansible 2.3.0 when statements should not include jinja2 templating delimiters such as {{ }} or {% %}, and gate is broken with Ansible 2.3.1. This patchset rewrite when statement in rabbitmq precheck task to not use string interpolation. Change-Id: Ie2f1666cc8ced7cf20ceba40c7c7aaec750778f9 Closes-Bug: #1695111 --- ansible/roles/rabbitmq/tasks/precheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/rabbitmq/tasks/precheck.yml b/ansible/roles/rabbitmq/tasks/precheck.yml index 9da15ca861..ac318815a1 100644 --- a/ansible/roles/rabbitmq/tasks/precheck.yml +++ b/ansible/roles/rabbitmq/tasks/precheck.yml @@ -58,4 +58,4 @@ - 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 }}'" + - "item.stdout.find(hostvars[item['item']]['ansible_' ~ hostvars[item['item']]['api_interface']]['ipv4']['address']) == -1"