Valeriy Solovyov
2015-07-29 14:39:30 UTC
Hello,
I use some script that executes a ansible playbook from upstart.
If I use lookup for variable playbook/task/defaults/main.yml:
user: "{{ lookup('env','USER') }}"
home: "{{ lookup('env','HOME') }}"
It will the empty variables. Because upstart doesn't provide root or etc
env.
My question is how to setup default value if lookup will return the empty
result?
I use some script that executes a ansible playbook from upstart.
If I use lookup for variable playbook/task/defaults/main.yml:
user: "{{ lookup('env','USER') }}"
home: "{{ lookup('env','HOME') }}"
It will the empty variables. Because upstart doesn't provide root or etc
env.
My question is how to setup default value if lookup will return the empty
result?
--
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+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/89e31cca-7084-4f4d-b3f9-87040757aa31%40googlegroups.com.
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 ansible-project+***@googlegroups.com.
To post to this group, send email to ansible-***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/89e31cca-7084-4f4d-b3f9-87040757aa31%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.