ansible
Agentless IT automation and configuration management
TLDR
SYNOPSIS
ansible pattern [-m module] [-a args] [-i inventory] [options]
DESCRIPTION
ansible is an agentless IT automation tool that executes tasks on remote systems over SSH. It uses a push-based model, requiring no software installation on managed nodes beyond Python and SSH access.For ad-hoc commands, ansible executes modules against hosts matching a pattern. For complex automation, use ansible-playbook with YAML playbooks.
PARAMETERS
-m module, --module-name module
Name of the module to execute (default: command)-a args, --args args
Module arguments as key=value or JSON-i inventory, --inventory inventory
Inventory file/path or comma-separated host list-b, --become
Run operations with privilege escalation (become)-K, --ask-become-pass
Prompt for privilege escalation password-u user, --user user
Connect as this user-k, --ask-pass
Prompt for SSH connection password-f forks, --forks forks
Number of parallel processes (default: 5)-l pattern, --limit pattern
Further limit selected hosts to an additional pattern-v, -vvv, --verbose
Increase verbosity (repeat for more detail)-C, --check
Dry run; predict changes without applying them--diff
Show differences in changed files (works with --check)--list-hosts
Output a list of matching hosts; do not execute
CONFIGURATION
/etc/ansible/ansible.cfg
System-wide Ansible configuration, including default module path, connection settings, and privilege escalation.~/.ansible.cfg
Per-user Ansible configuration overriding system defaults.ansible.cfg
Project-level configuration in the current directory, highest priority./etc/ansible/hosts
Default inventory file listing managed hosts and groups.
CAVEATS
Requires Python on managed nodes. SSH key-based authentication is recommended. Windows hosts require WinRM instead of SSH. Large inventories benefit from using ansible-playbook.
HISTORY
Ansible was created by Michael DeHaan and released in 2012. Red Hat acquired Ansible Inc. in 2015. It has become one of the most popular configuration management and automation tools.
SEE ALSO
ansible-playbook(1), ansible-inventory(1), ansible-vault(1), ansible-doc(1)
