Ansible is now evaluating some things earlier, though it may need to be
told to not evaluate lookup plugins at that stage.

Please file a ticket on github with steps to reproduce if you haven't done
so already.

Thanks!


On Mon, Apr 7, 2014 at 5:25 AM, Max Romanovsky <[email protected]>wrote:

> Hello,
>
> I have a problem after migration from 1.5.3 to 1.5.4
>
> My ansible directory is structured according to recommendations in Best
> Practices doc.
> It is stored in /vagrant/ansible
>
> /vagrant/ansible/group_vars/all contains directives like
>
> fileshare_username: foo
> fileshare_password: "{{ lookup('file',
> '../../../credentials/common/ldap/' + fileshare_username) }}"
>
> Password is stored in /vagrant/ansible/credentials/common/ldap/foo
>
> /vagrant/ansible/roles/app/tasks/main.yml contains task that uses these
> credentials:
>
> - name: copy smb credentials for the user
> sudo: yes
> sudo_user: "{{ cli_user }}"
> template: src=.smbcredentials.j2 dest=~/.smbcredentials mode=0600
> with_items:
> - {username: "{{ fileshare_username }}", password: "{{ fileshare_password
> }}"}
>
> I execute Ansible from /vagrant/ansible directory.
>
> After upgrade to 1.5.4 I receive the following message:
>
> /credentials/common/ldap/foo does not exist
>
>
> It means that now Ansible resolves this path from the current directory,
> while earlier it resolved this path from the base directory of
> /vagrant/ansible/roles/app/tasks/main.yml file.
> If I change fileshare_password value to "{{ lookup('file',
> 'credentials/common/ldap/' + fileshare_username) }}" or "{{
> lookup('file', './credentials/common/ldap/' + fileshare_username) }}"then it 
> starts looking for the
> /vagrant/ansible/roles/app/files/credentials/common/ldap/foo file.
> Changing value to "{{ lookup('file',
> './../../../credentials/common/ldap/' + fileshare_username) }}" don't
> help (it falls to /credentials).
>
> I'm using self-compiled deb packages for Debian 7 without any
> modifications (git clone && git checkout v1.5.4 && make deb).
>
> I haven't posted issue on github because I'm not sure if it's an issue.
>
>
> Thanks in advance.
>
> --
> 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/dea62f63-d9b0-467c-80bd-9d5cbf4ccb24%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/dea62f63-d9b0-467c-80bd-9d5cbf4ccb24%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/CAEVJ8QPPXRy%2BmedtjHeBnFme3ukNXR5R2bFbyiD-GBncQZP0%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to