mirror of
https://github.com/de-it-krachten/ansible-role-facts
synced 2026-05-14 03:31:57 +00:00
No description
- Jinja 100%
## [1.18.1](https://github.com/de-it-krachten/ansible-role-facts/compare/v1.18.0...v1.18.1) (2026-05-11) ### Bug Fixes * Fix support for kernel module facts (lsmod) ([ |
||
|---|---|---|
| .github/workflows | ||
| defaults | ||
| handlers | ||
| meta | ||
| molecule/default | ||
| tasks | ||
| templates | ||
| .ansible-lint | ||
| .cicd | ||
| .cicd.overwrite | ||
| .collections | ||
| .gitignore | ||
| .releaserc.yml | ||
| .roles | ||
| .yamllint | ||
| CHANGELOG.md | ||
| README.md | ||
ansible-role-facts
Provisions custom facts and runs setup optionally
Dependencies
Roles
- deitkrachten.epel
- deitkrachten.python
Collections
- ansible.windows
- community.general
Platforms
Supported platforms
- Red Hat Enterprise Linux 81
- Red Hat Enterprise Linux 91
- Red Hat Enterprise Linux 101
- RockyLinux 8
- RockyLinux 9
- RockyLinux 10
- OracleLinux 8
- OracleLinux 9
- OracleLinux 10
- AlmaLinux 8
- AlmaLinux 9
- AlmaLinux 10
- Debian 11 (Bullseye)
- Debian 12 (Bookworm)
- Debian 13 (Trixie)
- Ubuntu 20.04 LTS
- Ubuntu 22.04 LTS
- Ubuntu 24.04 LTS
- Ubuntu 26.04 LTS
- Fedora 43
- Fedora 441
- Alpine 3
- Windows Server 2012 R21
- Windows Server 20161
- Windows Server 20191
- Windows Server 20221
- Windows Server 20251
Note: 1 : no automated testing is performed on these platforms
Role Variables
defaults/main.yml
# facts location
facts_path: /etc/ansible/facts.d
# list of defaults facts to distribute
# Possible attributes : name, groups (default=all), os (default=all), os_family (default=all)
# groups, os and os_family should be lists
facts_custom:
- name: kernel
- name: users
- name: users_ext
- name: groups
- name: groups_ext
- name: repolist
os_family: [ 'RedHat' ]
- name: cpu
- name: scsi
- name: mapper
- name: platform
- name: lsmod
# List of packages required to custom facts
facts_packages:
- kmod
# List of tools to install in python venv
facts_venv:
- name: jc
packages:
- jc
# Additional facts to distribute
facts_custom_additional: "{{ custom_facts_additional | default([]) }}"
# Run setup when facts change
facts_run_setup: true
# Execute setup in all cases
facts_force_run_setup: false
defaults/family-Debian.yml
# List of packages required to custom facts
facts_packages:
- kmod
- python3-venv
defaults/family-Windows.yml
# facts location
facts_path: c:\temp\facts
# list of defaults facts to distribute
# Possible attributes : name, groups (default=all), os (default=all), os_family (default=all)
# groups, os and os_family should be lists
facts_custom:
- disks_custom
- platform
# customer facts to distribute
facts_custom_additional: "{{ custom_facts_additional | default([]) }}"
# Run setup when facts change
facts_run_setup: true
Example Playbook
molecule/default/converge.yml
- name: sample playbook for role 'facts'
hosts: all
become: 'yes'
tasks:
- name: Include role 'facts'
ansible.builtin.include_role:
name: facts
- name: sample playbook for role 'facts' post playbook
ansible.builtin.import_playbook: converge-post.yml
when: molecule_converge_post is undefined or molecule_converge_post | bool