buluma.facts
Ansible Role Facts
This role allows you to add custom facts to an Ansible system.
GitHub | Version | Issues | Pull Requests | Downloads |
---|---|---|---|---|
Example Playbook
Here’s a sample taken from molecule/default/converge.yml
. It is tested every time there is a change or new release.
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: buluma.facts
facts:
- key: datacenter
value: Amsterdam
- key: availability_zone
value: west
Before running this, the machine needs to be set up. In CI, this uses molecule/default/prepare.yml
:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: buluma.bootstrap
You can also find a full guide on using these roles.
Role Variables
Default variable values are in defaults/main.yml
:
---
# defaults file for facts
# You can send key-value pairs to this role, which will place the facts in
# `custom.fact`. For example, this dictionary:
# facts:
# - key: datacenter
# value: Amsterdam
# - key: availability_zone
# value: west
#
# Would create these facts:
#
# "ansible_local": {
# "custom": {
# "availability_zone": "west",
# "datacenter": "Amsterdam"
# }
# },
facts: []
Requirements
- Python packages listed in requirements.txt.
State of Used Roles
These roles are used to prepare a system. You can use other methods to prepare your system.
Requirement | GitHub | Version |
---|---|---|
buluma.bootstrap |
Context
This role works with many other compatible roles. Check the documentation of these roles for more details.
Here’s an overview of related roles:
Compatibility
This role has been tested using these container images:
container | tags |
---|---|
Alpine | all |
Amazon | Candidate |
EL | 8 |
Debian | all |
Fedora | all |
opensuse | all |
Ubuntu | all |
Ansible version 2.12 or higher is needed. Tests have been done on:
- The previous version.
- The current version.
- The development version.
If you find problems, please report them on GitHub.
Changelog
License
Author Information
ansible-galaxy install buluma.facts