community.general.facter 模块 – 在远程系统上运行发现程序 facter

注意

此模块是 community.general 集合 (版本 10.1.0) 的一部分。

如果您使用的是 ansible 包,则可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用: ansible-galaxy collection install community.general。您需要其他要求才能使用此模块,有关详细信息,请参阅 要求

要在剧本中使用它,请指定: community.general.facter

概要

要求

执行此模块的主机需要以下要求。

  • facter

  • ruby-json

参数

参数

注释

arguments

列表 / 元素=字符串

指定 facter 的参数。

属性

属性

支持

描述

check_mode

支持:不支持

可以在 check_mode 中运行并返回更改状态预测,而无需修改目标。

diff_mode

支持:不支持

在差异模式下,将返回有关已更改内容(或可能需要在 check_mode 中更改)的详细信息。

示例

# Example command-line invocation
# ansible www.example.net -m facter

- name: Execute facter no arguments
  community.general.facter:

- name: Execute facter with arguments
  community.general.facter:
    arguments:
        - -p
        - system_uptime
        - timezone
        - is_virtual

作者

  • Ansible核心团队

  • Michael DeHaan