community.general.facter_facts module – Runs the discovery program facter
on the remote system and return Ansible facts
Note
This module is part of the community.general collection (version 8.6.8).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.facter_facts
.
New in community.general 8.0.0
Synopsis
Runs the
facter
discovery program (https://github.com/puppetlabs/facter) on the remote system, returning Ansible facts from the JSON data that can be useful for inventory purposes.
Requirements
The below requirements are needed on the host that executes this module.
facter
ruby-json
Parameters
Parameter |
Comments |
---|---|
Specifies arguments for facter. |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full This action does not modify state. |
Can run in |
|
Support: N/A This action does not modify state. |
Will return details on what has changed (or possibly needs changing in |
|
Support: full |
Action returns an |
Examples
- name: Execute facter no arguments
community.general.facter_facts:
- name: Execute facter with arguments
community.general.facter_facts:
arguments:
- -p
- system_uptime
- timezone
- is_virtual
Returned Facts
Facts returned by this module are added/updated in the hostvars
host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them.
Key |
Description |
---|---|
Dictionary containing facts discovered in the remote system. Returned: always |