Using ansible 2.3.1.0 and the following playbook:
- hosts: localhost
tasks:
- debug: msg={{ vars }}
I get, amongst others: "ansible_os_family": "Archlinux", and
"ansible_distribution": "Archlinux",
What version are you using?
Le vendredi 21 juillet 2017 18:32:16 UTC+2, mdl a écrit :
>
> 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/50d62ef5-2648-40b1-a6a6-c257484567fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.