community.general.facter_facts (8.5.0) — module

Runs the discovery program C(facter) on the remote system and return Ansible facts

| "added in version" 8.0.0 of community.general"

Authors: Ansible Core Team, Michael DeHaan

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Runs the C(facter) discovery program (U(https://github.com/puppetlabs/facter)) on the remote system, returning Ansible facts from the JSON data that can be useful for inventory purposes.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Execute facter no arguments
  community.general.facter_facts:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Execute facter with arguments
  community.general.facter_facts:
    arguments:
        - -p
        - system_uptime
        - timezone
        - is_virtual

Inputs

    
arguments:
    description:
    - Specifies arguments for facter.
    elements: str
    type: list

Outputs

ansible_facts:
  contains:
    facter:
      description: Dictionary containing facts discovered in the remote system.
      returned: always
      type: dict
  description: Dictionary with one key C(facter).
  returned: always
  type: dict