sujiar37 / AWX-HA-InstanceGroup

Build AWX clustering on Docker Standalone Installation
MIT License
107 stars 39 forks source link

remove braces from "with" statement #12

Closed ioggstream closed 5 years ago

ioggstream commented 5 years ago

This PR

Fixes the following issue:

 [WARNING]: when statements should not include jinja2 templating delimiters such as {{ }} or {% %}. Found: {{ web_node_count }} >= 2
sujiar37 commented 5 years ago

Hey @ioggstream ,

Thank you for your pull request. It seems that the mentioned change were affecting the playbook execution and it is throwing out below error while executing it,

FAILED! => {"msg": "The conditional check 'web_node_count >= 2' failed. The error was: Unexpected templating type error occurred on ({% if web_node_count >= 2 %} True {% else %} False {% endif %}): '>=' not supported between instances of 'str' and 'int'\n\nThe error appears to be in '/home/sujithar/suji_github/AWX-HA-InstanceGroup/roles/rabbitmq_cluster/tasks/join_rmq_cluster.yml'

Ref: https://github.com/ansible/ansible/issues/22397

However, I was able to run it properly with a tiny modification since web_node_count is defined as a variable here,

  when:
    - web_node_count | int >= 2

Would you please make the necessary changes like above or any other alternatives since I appreciate your time for this PR and wish to merge it.

sujiar37 commented 5 years ago

@ioggstream Thank you for your contribution 👍