Created
September 12, 2025 10:33
-
-
Save pfuntner/a17574f98608bf5e0367728a41342dcb to your computer and use it in GitHub Desktop.
What OS family does Ansible use for AL2023/Alma9/UBI9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ docker images | |
| REPOSITORY TAG IMAGE ID CREATED SIZE | |
| amazonlinux 2023 1a9d780a8670 38 hours ago 149MB | |
| almalinux 9 1e86a8eba5bf 3 days ago 189MB | |
| registry.access.redhat.com/ubi9/ubi latest b096626d71c9 8 days ago 210MB | |
| $ docker ps | |
| CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
| c916af1b8d3e registry.access.redhat.com/ubi9/ubi:latest "/bin/bash" 6 minutes ago Up 6 minutes ubi9 | |
| 82dd07653534 almalinux:9 "/bin/bash" 11 minutes ago Up 11 minutes alma9 | |
| 7a906b00db7c amazonlinux:2023 "/bin/bash" 12 minutes ago Up 12 minutes al2023 | |
| $ cat ansible_os_family.yml | |
| - hosts: all | |
| tasks: | |
| - debug: | |
| var: ansible_os_family | |
| $ ansible-playbook --connection docker -i ubi9,alma9,al2023, ansible_os_family.yml | |
| PLAY [all] *************************************************************************************************************************************************** | |
| TASK [Gathering Facts] *************************************************************************************************************************************** | |
| Friday 12 September 2025 06:30:30 -0400 (0:00:00.012) 0:00:00.012 ****** | |
| [WARNING]: Platform linux on host al2023 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.18/reference_appendices/interpreter_discovery.html for more | |
| information. | |
| ok: [al2023] | |
| [WARNING]: Platform linux on host alma9 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.18/reference_appendices/interpreter_discovery.html for more | |
| information. | |
| ok: [alma9] | |
| [WARNING]: Platform linux on host ubi9 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.18/reference_appendices/interpreter_discovery.html for more | |
| information. | |
| ok: [ubi9] | |
| TASK [debug] ************************************************************************************************************************************************* | |
| Friday 12 September 2025 06:30:33 -0400 (0:00:02.880) 0:00:02.893 ****** | |
| ok: [ubi9] => { | |
| "ansible_os_family": "RedHat" | |
| } | |
| ok: [alma9] => { | |
| "ansible_os_family": "RedHat" | |
| } | |
| ok: [al2023] => { | |
| "ansible_os_family": "RedHat" | |
| } | |
| PLAY RECAP *************************************************************************************************************************************************** | |
| al2023 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |
| alma9 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |
| ubi9 : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |
| Friday 12 September 2025 06:30:33 -0400 (0:00:00.073) 0:00:02.967 ****** | |
| =============================================================================== | |
| gather_facts ------------------------------------------------------------ 2.88s | |
| debug ------------------------------------------------------------------- 0.07s | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| total ------------------------------------------------------------------- 2.95s | |
| $ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment