I now have this two yml files and ansible-playbook works. Cross my
fingers....
Steven.
---
- name: Gathering the local facts from tags
hosts: all
gather_facts: yes
roles:
- facts
- include: base_test.yml
----------------
base-test.yml:
---
- include: base_centos6.yml
when: ansible_distribution_major_version == '6'
- include: base_centos7.yml
when: ansible_distribution_major_version == '7'
On Thursday, February 23, 2017 at 1:02:48 PM UTC-8, Steven Truong wrote:
>
> Thanks. Brian....
>
> On Thursday, February 23, 2017 at 11:54:15 AM UTC-8, Brian Coca wrote:
>>
>> it does evaluate variables lazily, the problem is that play includes
>> run at compile time, so the variable is needed before the fact
>> gathering happens.
>>
>>
>> ----------
>> Brian Coca
>>
>
--
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/38d66271-d5b9-4f85-a0c5-360d2d337bee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.