user: "{{ lookup('env','USER')|default('root') }}"
On Wed, Jul 29, 2015 at 10:39 AM, Valeriy Solovyov
<[email protected]> wrote:
> 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?
>
> --
> 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/89e31cca-7084-4f4d-b3f9-87040757aa31%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
Brian Coca
--
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/CAJ5XC8kM1-65RtsBX8U_z6Me8m9KRmq7ZoJGoN6bbzzF-L%3D-HQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.