Well I will check of I'm running that version because that's exactly what's
happening, empty variables, also the funny thing about it is that the
playbook is run loclahost, when I run env in the machine I do get all the
variables right. But when running the playbook some of those variables are
empty and so the result in my templates

On Wednesday, June 11, 2014, James Cammarata <jcammar...@ansible.com> wrote:

> There was also a bug in the early 1.6 branch (fixed in either 1.6.1 or
> 1.6.2) where the following resulted in an empty variable:
>
> vars:
>   HOME: "{{lookup('env', 'HOME')}}"
>
> This should be resolved in the latest stable release as well as in the
> devel branch, just in case that's what you're running into.
>
>
>
> On Wed, Jun 11, 2014 at 2:16 AM, Tomasz Kontusz <tomasz.kont...@gmail.com
> <javascript:_e(%7B%7D,'cvml','tomasz.kont...@gmail.com');>> wrote:
>
>>
>>
>> Marcos Cano <mc...@stsa.info
>> <javascript:_e(%7B%7D,'cvml','mc...@stsa.info');>> napisał:
>> >when running  "{{ lookup('env','HOME') }}"  what does ansible exactly
>> >do..
>> Step by step:
>>  - it looks for a lookup plugin 'env'
>>  - calls it with your args (WARNING: it does that locally, not on the
>> remote!)
>>  - in case of this plugin, it returns a value from named environment
>> variable
>>
>> >i've set a few variables in different files
>> >in
>> >/etc/environment
>> >/etc/profile
>> >/root/.bashrc
>> >/etc/bash.bashrc
>> >
>> >
>> >and ansible does not recognize any of them but it does recognize PATH.
>> Are you sure you've exported them? In bash you have to export variables
>> to make them visible to subprocesses (with "export VAR" after setting it,
>> or just "export VAR=value").
>>
>> >
>> >any suggestion?
>>
>> Try to run ansible-playbook like:
>>   SOMEVAR=value ansible-playbook ...
>> Then you can be sure that SOMEVAR is set.
>> --
>> Wysłane za pomocą K-9 Mail.
>>
>> --
>> 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+unsubscr...@googlegroups.com
>> <javascript:_e(%7B%7D,'cvml','ansible-project%2bunsubscr...@googlegroups.com');>
>> .
>> To post to this group, send email to ansible-project@googlegroups.com
>> <javascript:_e(%7B%7D,'cvml','ansible-project@googlegroups.com');>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/746827c0-1801-4018-b1c1-b3752e09707e%40email.android.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/ansible-project/uHn9QnONWW4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ansible-project+unsubscr...@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','ansible-project%2bunsubscr...@googlegroups.com');>
> .
> To post to this group, send email to ansible-project@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','ansible-project@googlegroups.com');>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAMFyvFhd0NfEQGy0LFP0_RhY-rrBJ8C6QF6HSt%2BEeE_gjXRRhg%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAMFyvFhd0NfEQGy0LFP0_RhY-rrBJ8C6QF6HSt%2BEeE_gjXRRhg%40mail.gmail.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 ansible-project+unsubscr...@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/CAP2Rsa%2B4-a%2B550YK1Zt%2Bx3URtzO4bCTNJW_DAa2R2ebCDJOBZg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to