ALv2 reports odd data in ansible_distribution and ansible_os_family

6 views
Skip to first unread message

Thomas Kern

unread,
Jun 4, 2020, 11:15:54 AM6/4/20
to Ansible Project
We have just begun to use Ansible to manage some ALv2 instances in AWS. We manage RHEL 6/7, CentOS 6/7, OEL 6/7 in our home networks without problems. We have a playbook that gathers facts from servers and updates a local MySQL database. When this playbook runs against an ALv2 instance in AWS, it gets two facts that cannot nice be used as data for a MySQL insert. The ansible_distribution and ansible_os_family both come back as "NAME=\"Amazon". The values for RHEL7, CentOS7 and OEL7 are properly formated single words.

(xxxx@yyyyy)$ ansible adminaws,gtlxgmsd02,gtlxgmsd04,gtlxgmsd03 -b -m setup | grep 'ansible_distribution"'
        "ansible_distribution": "NAME=\"Amazon", 
        "ansible_distribution": "CentOS", 
        "ansible_distribution": "OracleLinux", 
        "ansible_distribution": "RedHat",  

I will be looking to clean the output of 'setup' for ALv2, but I would prefer that ALv2 look more like a normal derivative of RHEL 7. Does anyone know if this can be cleaned up via a configuration change on the ALv2 instance or ansible?

Abhijeet Kasurde

unread,
Jun 5, 2020, 2:02:59 AM6/5/20
to ansible...@googlegroups.com
Hi Thomas,

Thanks for reporting this. Could you please raise an issue against 'ansible/ansible' repo with the required details? Also, it would be helpful to provide the output of this https://github.com/ansible/ansible/blob/598e3392a9597f0214d68882da4f4ca07314ce41/hacking/tests/gen_distribution_version_testcase.py script along with issue.

Thanks,

--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7bcfff42-be88-436c-80ee-fd850000f267%40googlegroups.com.


--
Thanks,
Abhijeet Kasurde
Reply all
Reply to author
Forward
0 new messages