ansible
Manage groups of computers remotely over SSH. (use the `/etc/ansible/hosts` file to add new groups/hosts). Some subcommands such as `galaxy` have their own usage documentation.
More info →Subcommands (7)
Display information on modules installed in Ansible libraries. Display a terse listing of plugins and their short descriptions.
Perform various Ansible Role and Collection related operations.
Display or dump an Ansible inventory. See also: `ansible`.
Apply rules and follow best practices with your automation content.
Execute tasks defined in playbook on remote machines over SSH.
Pull ansible playbooks from a VCS repo and executes them for the local host.
Encrypt and decrypt values, data structures, and files within Ansible projects.
Options (4)
-m, --module-namebooleanPing a group of hosts by invoking the ping module
ansible {{group}} {{[-m|--module-name]}} ping-a, --argsbooleanExecute a command on a group of hosts by invoking command module with arguments
ansible {{group}} {{[-m|--module-name]}} command {{[-a|--args]}} '{{my_command}}'-b, --becomebooleanExecute a command with administrative privileges
ansible {{group}} {{[-b|--become]}} --ask-become-pass {{[-m|--module-name]}} command {{[-a|--args]}} '{{my_command}}'-i, --inventorybooleanExecute a command using a custom inventory file
ansible {{group}} {{[-i|--inventory]}} {{inventory_file}} {{[-m|--module-name]}} command {{[-a|--args]}} '{{my_command}}'Examples (7)
List hosts belonging to a group
ansible group --list-hostsDisplay facts about a group of hosts by invoking the setup module
ansible group [-m|--module-name] setupExecute a command on a group of hosts by invoking command module with arguments
Execute a command with administrative privileges
Execute a command using a custom inventory file
List the groups in an inventory
ansible localhost [-m|--module-name] debug [-a|--args] 'var=groups.keys()'