On 9/8/20 1:47 PM, [email protected] wrote:
> I tried this, but it just gives me error:
> "The conditional check 'inventory_hostname == redundancynode' failed. The 
> error was: error while evaluating conditional
> (inventory_hostname == redundancynode): 'redundancynode' is undefined"

You have to set this variable, otherwise your playbook doesn't work.

> 
> It is also not possible to use jinja2 for that
> 
> when: inventory_hostname == {{ redundancynode }} or
> when: inventory_hostname == "{{ redundancynode }}"

when conditions are automatically wrapped in curly braces, so it is Jinja 
already.

> 
> Can the problem be that redundancynode is already in quotes?
> 
> So that ansible is reading this as:
> when: inventory_hostname == ""node4""

See above.

Regards
         Racke

> 
> 
> [email protected] schrieb am Dienstag, 8. September 2020 um 13:26:35 UTC+2:
> 
>     On 9/8/20 1:20 PM, Peter Gebirgslok wrote:
>     > I dont know how to edit my post, but there is also no typo in the when 
> condition
>     >
>     > this i how the when condition looks like.
>     >
>     > when: inventory_hostname == "redundancynode"
>     >
> 
>     You can't edit your post of course. Change that line to:
> 
>     when: inventory_hostname == redundancynode
> 
>     Regards
>     Racke
> 
>     > --
>     > 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
>     > [email protected] 
> <mailto:[email protected]>.
>     > To view this discussion on the web visit
>     > 
> https://groups.google.com/d/msgid/ansible-project/1b42b037-424a-4028-a742-703be574f215o%40googlegroups.com
>     >
>     
> <https://groups.google.com/d/msgid/ansible-project/1b42b037-424a-4028-a742-703be574f215o%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> 
>     -- 
>     Ecommerce and Linux consulting + Perl and web application programming.
>     Debian and Sympa administration. Provisioning with Ansible.
> 
> -- 
> 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
> [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/016641c5-92b0-4940-93c5-3fe154f368d3n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/016641c5-92b0-4940-93c5-3fe154f368d3n%40googlegroups.com?utm_medium=email&utm_source=footer>.


-- 
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6e63f084-fce1-2574-430f-74aa4c0ad283%40linuxia.de.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to