kolla prechecks fail with ansible>=2.3.1.0

Bug #1699889 reported by Emma Foley
This bug report is a duplicate of:  Bug #1695111: Ansible 2.3.1 broke preckecks. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
New
Undecided
Unassigned

Bug Description

TASK [rabbitmq : fail] **********************************************************************************************************************************************************************************************************************
 [WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: '{{ hostvars[item['item']]['ansible_' + hostvars[item['item']]['api_interface']]['ipv4']['address'] }}' not in '{{ item.stdout
}}'

fatal: [testing-kolla]: FAILED! => {"failed": true, "msg": "The conditional check ''{{ hostvars[item['item']]['ansible_' + hostvars[item['item']]['api_interface']]['ipv4']['address'] }}' not in '{{ item.stdout }}'' failed. The error was: Invalid conditional detected: EOL while scanning string literal (<unknown>, line 1)\n\nThe error appears to have been in '/usr/local/share/kolla-ansible/ansible/roles/rabbitmq/tasks/precheck.yml': line 54, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- fail: msg=\"Hostname has to resolve to IP address of api_interface\"\n ^ here\n"}
        to retry, use: --limit @/usr/local/share/kolla-ansible/ansible/site.retry

PLAY RECAP **********************************************************************************************************************************************************************************************************************************
testing-kolla : ok=38 changed=0 unreachable=0 failed=1

Command failed ansible-playbook -i /usr/local/share/kolla-ansible/ansible/inventory/all-in-one -e @/etc/kolla//globals.yml -e @/etc/kolla/passwords.yml -e CONFIG_DIR=/etc/kolla/ -e action=precheck /usr/local/share/kolla-ansible/ansible/site.yml --verbose

sudo kolla-ansible --verbose --configdir /etc/kolla/ -i /usr/local/share/kolla-ansible/ansible/inventory/all-in-one prechecks

Source of the issue:
[WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: '{{ hostvars[item['item']]['ansible_' + hostvars[item['item']]['api_interface']]['ipv4']['address'] }}' not in '{{ item.stdout
}}'

Ansible no longer supports using jinja2 templating delimiters in "when" statements
Happens with ansible 2.3.1.0 (released on June 1, 2017)
works with ansible<2.3.1.0

Workaround: 'sudo pip install -U ansible<2.3.1.0'
Fix: Remove jinja templating from when causes?

description: updated
Revision history for this message
Eduardo Gonzalez (egonzalez90) wrote :

Was already fixed in master and backported to ocata.

Marking bug as duplicated of:

https://bugs.launchpad.net/kolla-ansible/+bug/1695111

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.