Skip to main content

Module modules

Module modules 

Source
Expand description

The native modules and what the controller needs to know about them before the agent runs them. Written once here; the agent’s implementation table and the documentation are checked against it.

Structs§

ModuleArg
One argument of one module, and what this release does with it.
ModuleSpec
One native module: its Ansible name and how the controller parses its arguments.

Enums§

ArgStatus
What one module does with one of its arguments.

Constants§

BUILTIN_MODULES
Every module ansible.builtin ships in ansible-core 2.19.12, as ansible-doc -l -t module ansible.builtin lists them, sorted and short-named. A playbook naming one of these and none of NATIVE_MODULES or LOCAL_MODULES is a playbook this release cannot run yet, which the operator needs to hear differently from a name that resolves to no module at all: the first waits on us, the second is a typo.
COMMAND
DEBUG
IMPORT_MODULES
The three statements that read a file while the play is being compiled instead of naming work for a host, with whether their string form is one raw argument.
INCLUDE_MODULES
The two statements that name work read while the play is running rather than while it is being compiled, with whether their string form is one raw argument.
INCLUDE_VARS
LOCAL_MODULES
Modules the controller runs itself and never sends to a host, sorted by name.
NATIVE_MODULES
Every module the agent implements natively, sorted by name.
RAW
SET_FACT
SHELL
VALIDATE_ARGUMENT_SPEC

Functions§

arg_bool
A value read the way the reference reads an argument declared type='bool'.
documentation_table
The Markdown table published in the documentation, generated so it cannot drift.
import_module
Whether the module is one of the three import statements, and whether its string form is raw.
include_module
Whether the module is one of the two include statements, and whether its string form is raw.
is_builtin
Whether module names a builtin, bare or under the two prefixes that mean the same thing. Another collection’s module is never one, however familiar the short name looks: if community.general.command were taken for a builtin, a playbook naming it would be told to wait for a release that will never contain it.
is_known
Whether this engine can run the module at all, natively on the agent or on the controller. The two tables are all there is, so a playbook naming anything else can be refused while it is being loaded, which is where the reference refuses a module it cannot resolve.
local
native
short_name
ansible.builtin. and ansible.legacy. name the same modules as the bare name does. Other collections are returned whole: community.general.command is not our command.