Module Reference

These 134 modules are compiled into the binary. A task naming anything else fails to resolve: there is no Python fallback, so a module that is not listed here is not available.

Collections: builtin (71), community.general (50), posix (13)

ModuleSynopsisCollection
aclSet and remove POSIX filesystem access control listsposix
add_host controllerAdd a host to the in-memory inventory during a playbuiltin
alternativesManage symbolic links in the update-alternatives systemcommunity.general
ansible.posix.mountManage filesystem mounts and their fstab entriesposix
aptInstall, upgrade and remove packages with apt on Debian and Ubuntubuiltin
apt_keyAdd or remove trusted apt signing keysbuiltin
apt_repositoryAdd or remove an apt repository definitionbuiltin
archiveCreate a compressed archive from files on the targetcommunity.general
assembleConcatenate fragment files from a directory into one destination filebuiltin
assert controllerFail the play unless the given conditions all holdbuiltin
async_statusPoll the status of a task started with asyncbuiltin
atSchedule a one-off command with the at daemonposix
authorized_keyManage the SSH keys authorised for a userposix
blockinfileInsert, update or remove a marked block of lines in a filebuiltin
capabilitiesSet and remove Linux file capabilitiescommunity.general
commandRun a command directly, without a shellbuiltin
composerManage PHP dependencies with Composercommunity.general
copyCopy files from the controller to remote hostsbuiltin
cpanmInstall Perl modules with cpanminuscommunity.general
cronManage entries in a user's crontabbuiltin
dconfRead and write dconf configuration keyscommunity.general
deb822_repositoryManage apt repositories in the deb822 .sources formatbuiltin
debconfRead and set debconf answers before a package is configuredbuiltin
debug controllerPrint a message or the value of a variable during a playbuiltin
dnfInstall, upgrade and remove packages with dnf on Fedora and RHELbuiltin
dnf5Install, upgrade and remove packages with the dnf5 backendbuiltin
docker_composeBring Docker Compose projects up and downcommunity.general
docker_networkCreate and remove Docker networks and their optionscommunity.general
docker_volumeCreate and remove named Docker volumescommunity.general
dpkg_selectionsPin or unpin a dpkg package selectionbuiltin
easy_installInstall Python packages with easy_installcommunity.general
expectRun a command and answer its interactive promptsbuiltin
fail controllerStop the play on this host with a custom messagebuiltin
fetchCopy files from remote hosts back to the controllerbuiltin
fileManage the state, ownership and permissions of files and directoriesbuiltin
fileglob controllerList controller-side files matching a glob patterncommunity.general
filesystemCreate and grow filesystems on block devicescommunity.general
findSearch a directory tree for files matching size, age or name criteriabuiltin
firewalldManage firewalld zones, services, ports and rich rulesposix
flatpakInstall and remove Flatpak applicationscommunity.general
gemInstall and remove Ruby gemscommunity.general
get_urlDownload a file over HTTP, HTTPS or FTP to the targetbuiltin
getentQuery a Name Service Switch database such as passwd or groupbuiltin
gitCheck out and update a git repository on the targetbuiltin
groupCreate, modify and remove Unix groupsbuiltin
group_by controllerCreate inventory groups from a host expression during a playbuiltin
homebrewManage Homebrew packages on macOS and Linuxcommunity.general
hostnameSet the system hostnamebuiltin
htpasswdManage user entries in an Apache htpasswd filecommunity.general
import_roleStatically import a role's tasks at parse timebuiltin
import_tasksStatically include a task file at parse timebuiltin
include_tasksDynamically include a task file at run timebuiltin
include_varsLoad variables from a file or directory into the playbuiltin
ini_fileManage individual options in an INI-style filecommunity.general
iptablesManage individual iptables rulesbuiltin
jenkins_jobCreate, update and remove Jenkins jobscommunity.general
json_query controllerQuery a structure with a JMESPath expressioncommunity.general
known_hostsAdd or remove entries in a known_hosts filebuiltin
lineinfileEnsure a single line is present in, or absent from, a filebuiltin
listen_ports_factsGather facts about TCP and UDP ports in the listening statecommunity.general
locale_genGenerate and remove system localescommunity.general
lvgManage LVM volume groupscommunity.general
lvm_factsGather facts about LVM physical volumes, volume groups and logical volumescommunity.general
lvolManage LVM logical volumescommunity.general
mailSend an email from the playbookcommunity.general
makeRun make targets in a directorycommunity.general
meta controllerControl playbook execution flow, such as ending a play or clearing factsbuiltin
modprobeLoad and unload kernel modulescommunity.general
mountManage filesystem mounts and their fstab entriesbuiltin
mount_factsGather facts about currently mounted filesystemsbuiltin
mysql_userManage MySQL and MariaDB user accounts and privilegescommunity.general
nmcliConfigure network interfaces through NetworkManagercommunity.general
npmManage Node.js packages with npmcommunity.general
packageInstall or remove packages using whichever package manager the target usesbuiltin
package_factsGather facts about packages installed on the targetbuiltin
pam_limitsManage entries in limits.confcommunity.general
partedCreate, resize and remove disk partitionscommunity.general
patchApply a unified diff to files on the targetposix
pausePause the play for a fixed time or until the operator continuesbuiltin
pingVerify that a host is reachable and can run modulesbuiltin
pipManage Python packages with pipbuiltin
postgresql_privsGrant and revoke PostgreSQL privilegescommunity.general
postgresql_userCreate, alter and drop PostgreSQL login rolescommunity.general
rabbitmq_userManage RabbitMQ users, tags and permissionscommunity.general
rawRun a command over the connection with no module machinery at allbuiltin
read_csv controllerRead a CSV file into a list or dictionary of recordscommunity.general
rebootReboot the target and wait for it to come backbuiltin
redisRun Redis administrative commands such as replication and flushcommunity.general
replaceReplace every occurrence of a pattern in a filebuiltin
rhel_factsGather RHEL-specific facts about the targetposix
rhel_rpm_ostreeManage packages on RHEL rpm-ostree systemsposix
rpm_keyAdd or remove an RPM signing key from the trusted setbuiltin
rpm_ostree_pkgLayer and remove packages on rpm-ostree systemsposix
scriptCopy a script from the controller, run it on the target, then remove itbuiltin
sebooleanToggle SELinux boolean policy switches on or offposix
sefcontextManage SELinux file context mappingscommunity.general
selinuxConfigure the SELinux enforcing mode and policyposix
serviceStart, stop, restart and enable services on any init systembuiltin
service_factsGather facts about services known to the init systembuiltin
set_fact controllerDefine variables for the current host during a playbuiltin
setupCollect facts about the target hostbuiltin
shellRun a command through the target's shell, with pipes and redirectionbuiltin
slackSend a message to a Slack channelcommunity.general
slurpRead a file from the target and return it base64-encodedbuiltin
snapInstall and remove snap packagescommunity.general
ssh_configManage host entries in an SSH client config filecommunity.general
statRetrieve metadata about a file, directory or devicebuiltin
supervisorctlControl programs managed by supervisordcommunity.general
svnCheck out and update a Subversion working copybuiltin
synchronize controllerMirror files between controller and target using rsyncposix
sysctlSet kernel parameters and persist them to a sysctl fileposix
syslogdManage the syslog daemon service and its facilitiescommunity.general
systemdManage systemd units, including daemon reloads and maskingbuiltin
systemd_serviceManage systemd services by their unit namebuiltin
sysvinitManage services on hosts using SysV init scriptsbuiltin
tempfileCreate a temporary file or directory on the targetbuiltin
templateRender a Jinja2 template on the controller and install the resultbuiltin
terraformApply and destroy Terraform configurationscommunity.general
timezoneSet the system timezonecommunity.general
ufwManage ufw firewall rules and its default policycommunity.general
unarchiveUnpack an archive, optionally copying it to the target firstbuiltin
uriMake an HTTP request and check or capture the responsebuiltin
userCreate, modify and remove user accountsbuiltin
validate_argument_specValidate supplied arguments against a role's argument specificationbuiltin
vars_promptPrompt the operator for a variable valuebuiltin
wait_forWait for a port, path or pattern to reach a given statebuiltin
wait_for_connection controllerWait until the target accepts a connection and can run modulesbuiltin
xfs_quotaManage user, group and project quotas on XFS filesystemscommunity.general
xmlRead and modify XML documents with XPath expressionscommunity.general
yarnManage Node.js packages with Yarncommunity.general
yumInstall, upgrade and remove packages with yumbuiltin
yum_repositoryCreate and remove yum repository definitionsbuiltin
zfsManage ZFS datasets, volumes and their propertiescommunity.general