Didn't help but I eventually got all Linux vars into a Linux.yml, all RedHat dependent or Suse into their own and more specific OS family with specific version into its own file. Created an empty vars file and used the list includes feature.
In the playbook I include: ansible_system file than try [ansible_os_familly, empty.yml] than try [os family with major version , empty.yml] Works great. On Monday, July 14, 2014 5:38:30 PM UTC+3, Michael DeHaan wrote: > > Seems like the intermediate directory "playbooks/" may be the problem. > > > > > On Mon, Jul 14, 2014 at 3:24 AM, Leibo <[email protected] <javascript:>> > wrote: > >> Hi, >> >> trying *include_vars* I encounter an issue >> >> Trying this inside a role task: >> >> - include_vars: "{{item}}" >> with_first_found: >> - >> "vars/OS/{{ansible_distribution}}_{{ansible_distribution_major_version}}.yml" >> - "vars/OS/{{ansible_distribution}}.yml" >> - "vars/OS/{{ansible_system}}.yml" >> >> I get an error: >> >> TASK: [app1 | include_vars ] ******************************************* >> <linux1> ESTABLISH CONNECTION FOR USER: root >> failed: [linux1] => {"failed": true, "item": null} >> msg: No source file given >> >> In my server I have *playbooks/vars/OS/Linux*.yml >> >> Is there something wrong with my usage? >> >> >> >> On Sunday, July 13, 2014 11:24:49 PM UTC+3, Leibo wrote: >>> >>> Thanks, >>> by 'Non different' i meant as an example, tar command path is different >>> between RedHat 7 and the rest but gunzip is the same. I need to use both on >>> all roles. >>> The files_vars list will include the rhel 7 or the linux for the rest. >>> so i need gunzip on both to get it into all roles... >> >> -- >> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/2f5a4c83-be75-4e77-a808-f527d3ab0619%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/2f5a4c83-be75-4e77-a808-f527d3ab0619%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/4d666de9-c5fb-4ecb-8c1d-b2413190b38d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
