{{ipaddr|default('192.168.33.10')}}

On Jul 20, 2016 11:27 AM, "Tiglath" <[email protected]> wrote:



I have this:








*---- name: Run this play locally - Create CentOS 6.7 VM  hosts: localhost
connection: local  vars:    ipaddr: 192.168.33.10  tasks:  *        ...

If I pass ipaddr=<addr>  in the ansible-playbook command line
then I want that address instead of the  hard-coded one.

Something like this

vars: {{ ipaddr }}  |








*192.168.33.10Meaning take {{ ippaddr }} if specified else the hard-coded
default. What is the correct syntax to do that?   I've been looking in the
wrong places, it seems. Many thanks*

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/2a403c61-f947-47eb-9b3a-5051cebbf010%40googlegroups.com
<https://groups.google.com/d/msgid/ansible-project/2a403c61-f947-47eb-9b3a-5051cebbf010%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAAJLk14%2B5atjkiBwL9rBpUoquVc%3D86quBSZPx54NNaGk%2Bc9oMQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to