unfortunately no.
with
path_to_git_extras: >
PATH=$PATH:$ANSIBLE_21CT_HOME/roles/git/files
when the file gets templated to the remote, it contains the value of
ANSIBLE_21CT_HOME evaluated on the local machine. The remote has the
correct ANSIBLE_21CT_HOME path but it never gets a chance.
I tried something new with jinja2 templating which i was sure would work
but it seems that ansible $variable substitution happens in a peculiar way.
I tried this in my file template, but still get the local
$ANSIBLE_21CT_HOME evaluated.
TEST 1
{% filter string %}
export PATH="$PATH:$ANSIBLE_21CT_HOME/roles/git/files"
{% endfilter %}
TEST2
Testing with upper, i see the export line uppercased except for the
$ANSIBLE_21CT_HOME portion.
{% filter upper %}
export PATH="$PATH:$ANSIBLE_21CT_HOME/roles/git/files"
{% endfilter %}
Result
EXPORT PATH="$PATH:/Users/kbroughton/21ct-ansible/ROLES/GIT/FILES"
So it seems that in TEST2 that the jinja2 filter gets applied BEFORE the
ansible variable substitution,
but it appears that in TEST1 the jinja2 filter comes after, or is not being
applied somehow.
Peculiar.
kesten
On Tuesday, December 10, 2013 4:03:51 PM UTC-6, Kahlil Hodgson wrote:
>
>
> On 11 December 2013 08:48, Kesten Broughton
> <[email protected]<javascript:>
> > wrote:
>
>> path_to_git_extras: 'PATH=\\$PATH:\\$ANSIBLE_21CT_HOME/roles/git/files'
>>
>
> does '>' quoting help?
>
> path_to_git_extras: >
> PATH=$PATH:$ANSIBLE_21CT_HOME/roles/git/files
>
> K
>
--
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].
For more options, visit https://groups.google.com/groups/opt_out.