I'm testing Ansible roles with Archlinux and one of them uses 
ansible_os_family to include variables or tasks. So I have:
- name: include OS vars
  include_vars: "{{ ansible_os_family }}.yml"
  when: ansible_os_family == 'Archlinux'

Problem is that ansible_os_family gets 'Arch Linux' as value, so ansible 
looks for 'Arch Linux.yml' but filename is actually 'Archlinux.yml', just 
capital A and no spaces. I know this is not a fancy bug or anything, I've 
been looking at ansible code and GitHub issues but only found OS_FAMILY_MAP 
(Code here 
<https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/facts/system/distribution.py>)
 
and Arch seems to be defined as 'Archlinux' but never 'Arch Linux'.

Could anyone guide me because I do not know if something changed with 
/etc/os-release in Archlinux or maybe a bug needs to be reported to update 
variables like OS_FAMILY_MAP.

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/9ba41adc-6926-4530-a4c3-aa36f6bf6033%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to