- name: include OS vars
include_vars: "{{ ansible_os_family }}.yml"
when: ansible_os_family == 'Archlinux'
me@host ~> ansible --version 2
ansible 2.4.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/me/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.13 (default, Feb 11 2017, 12:22:40) [GCC 6.3.1 20170109]me@host ~/Ansible> cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
ID_LIKE=archlinux
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
me@host ~/Ansible> ansible-playbook arch-test.yml | grep ansible_os
"ansible_os_family": "Arch Linux",
"ansible_os_family": "Arch Linux",
"ansible_os_family": "Arch Linux",
"ansible_os_family": "Arch Linux",To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1d2a2890-2141-4514-a088-aaac97ef26fc%40googlegroups.com.--
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 ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.