ansible 1.7.2

My play:

- name: Configure firewall
   include: firewall.yml
   when: "{{pg_host}} != localhost"

gets me:

TASK: [postgres | Check if postgres is already allowed via IPv4]
**************
fatal: [jedis-test] => error while evaluating conditional: localhost !=
localhost


This looks like a case where ansible could maybe be a little more verbose?
  The line that's failing is the first play in firewall.yml I'm guessing
I'm just not clear on how to run another playbook if my variable is not
equal to localhost.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a32e4942-ac2a-48c0-a89f-4f98308f5574%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Titleistfour at Jan 1, 2015 at 6:22 pm
    John,

    What if you try this in your play?

    - name: Configure firewall
       include: firewall.yml
       when: pg_host != "localhost"

    Jay

    On Tuesday, December 30, 2014 12:20:00 PM UTC-6, John Oliver wrote:

    ansible 1.7.2

    My play:

    - name: Configure firewall
    include: firewall.yml
    when: "{{pg_host}} != localhost"

    gets me:

    TASK: [postgres | Check if postgres is already allowed via IPv4]
    **************
    fatal: [jedis-test] => error while evaluating conditional: localhost !=
    localhost


    This looks like a case where ansible could maybe be a little more verbose?
    The line that's failing is the first play in firewall.yml I'm guessing
    I'm just not clear on how to run another playbook if my variable is not
    equal to localhost.
    --
    You received this message because you are subscribed to the Google Groups "Ansible Project" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
    To post to this group, send email to ansible-project@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/690611aa-800d-42f9-8b43-179d3e70e6cd%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupansible-project @
postedDec 30, '14 at 6:20p
activeJan 1, '15 at 6:22p
posts2
users2

2 users in discussion

John Oliver: 1 post Titleistfour: 1 post

People

Translate

site design / logo © 2022 Grokbase