Closed aairey closed 6 months ago
Hey 👋
Thanks for reporting the issue !
With this error 'dict object' has no attribute 'os_family'
, I suspect the issue might be on your local ansible 🤔
Could you try this playbook ? It'll simply check if your ansible can gather os_family correctly.
---
- hosts: all
gather_facts: yes
connection: local
tasks:
- debug:
msg: "{{ ansible_facts.os_family }}"
You should expect something like that :
PLAY [all] ***********************************************************************************************************************************************************************************************************
TASK [Gathering Facts] ***********************************************************************************************************************************************************************************************
[WARNING]: Platform linux on host localhost is using the discovered Python interpreter at /usr/bin/python3.9, but future installation of another Python interpreter could change the meaning of that path. See
https://docs.ansible.com/ansible-core/2.15/reference_appendices/interpreter_discovery.html for more information.
ok: [localhost]
TASK [debug] *********************************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": "RedHat"
}
PLAY RECAP ***********************************************************************************************************************************************************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
If it's working as expected you can try to add gather_facts: yes
to your playbook and see if it fixes your issue with the datadog role
Sorry, noticed that later on but still it was picking yum instead of dnf as ansible_pkg_mgr.
I was running ansible-core 2.13 though, after more searching and upgrading to 2.16 it worked! 👍🏻
The role fails to run on Amazon Linux 2023 (Fedora based) OS.