arensb.truenas.truenas_facts module – Gather TrueNAS-related facts
Note
This module is part of the arensb.truenas collection (version 1.11.4).
To install it, use: ansible-galaxy collection install arensb.truenas
.
To use it in a playbook, specify: arensb.truenas.truenas_facts
.
New in arensb.truenas 1.7.0
Synopsis
Gather facts about a TrueNAS host, in the same way as
setup
does.Any facts discovered by this module will be mixed in with those discovered by other modules such as
setup
.See https://docs.ansible.com/ansible/latest/reference_appendices/config.html#facts-modules for how to use this module, as well as the Examples section.
You can set the environment variable
ANSIBLE_FACTS_MODULES
toarensb.truenas.truenas_facts
to use only this module to gather facts, or tosetup, arensb.truenas.truenas_facts
to use both the standardsetup
module and this one.Likewise, you can set the
ansible_facts_modules
inventory variable to the list of modules to use, either justarensb.truenas.truenas_facts
, or[setup, arensb.truenas.truenas_facts]
.This module may be used on non-TrueNAS hosts: it should simply fail gracefully and do nothing.
Notes
Note
Supports
check_mode
.Should run correctly on non-TrueNAS hosts.
See Also
See also
- Ansible Configuration Settings
Configure which fact-gathering modules to use.
Examples
- name: Manually gather information
collections: arensb.truenas
hosts: myhost
tasks:
- name: Gather TrueNAS-specific facts
arensb.truenas.truenas_facts:
# ansible_facts should have TrueNAS facts mixed in with the usual ones.
- debug: var=ansible_facts
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The host’s unique boot identifier. Changes every time the system boots. Returned: always Sample: |
|
The system build time, when the OS was built. Internally, this is a Python Returned: success Sample: |
|
The environment in which TrueNAS is running. One of Returned: always Sample: |
|
A map that says, for each system feature, whether it is enabled or not. Returned: success Sample: |
|
A hex string based on (but not identical to) the contents of This ID is permanent and persists across both reboots and upgrades, so it can be used as a unique identifier for the machine. Returned: always Sample: |
|
A string giving the overall name of the product, usually Returned: always Sample: |
|
The flavor of TrueNAS. One of Returned: always Sample: |
|
The current state of the system, one of Returned: always Sample: |
|
A dictionary with a number of facts about the system. See the sample value below. Returned: always Sample: |