Closed jfefe closed 8 years ago
After ansible upgrade, bus is still here when no relative path set.
You're welcome to test this with different version before merging it :)
Is this compatible with current stable Ansible release, stable-2.0
? This will most likely pass on Travis since it uses devel
branch for testing. I'm not sure if I should merge it just yet, since I don't want to break compatibility with stable release and i prefer to use new Ansible features in roles after they are available in stable version.
tested with ansible 2.0.2.0 : seems to be working with and without relative path :)
- name: "Debug with_first_found"
include_vars: '{{ item }}'
with_first_found: ['../vars/apt__default_sources_debian.yml']
tags: ['debug']
- name: Load default APT sources configuration
include_vars: '{{ item }}'
with_first_found:
- 'apt__default_sources_{{ apt__default_sources_lookup | lower }}.yml'
- 'apt__default_sources.yml'
when: True
tags: ['debug']
Results :
TASK [debops.apt : Debug with_first_found] *************************************
ok: [host] => (item=***debops/debops-playbooks/roles/debops.apt/templates/../vars/apt__default_sources_debian.yml)
TASK [debops.apt : Load default APT sources configuration] *********************
ok: [host] => (item=***debops/debops-playbooks/roles/debops.apt/vars/apt__default_sources_debian.yml)
@jfefe Great, then I'll merge it in, let's see if anybody reports issues. :-)
'with_first_found' lookup into {files,templates} directory so we must use relative path for vars/* (See https://github.com/ansible/ansible/issues/14454)
$ ansible --version ansible 2.2.0