Skip to main content
Kill -9 Club
Sign in

ansible

AutomationPackage: ansible-core

Runs one module on the inventory's hosts, without a playbook: ping to prove SSH gets through and Python answers, setup to read facts, command for a raw command. A host pattern matching nothing is not an error: a warning, and exit code 0.

What its options do in the lessons

From the same glossary the lessons render under their commands, so the two cannot disagree.

ansible --version
Prints the ansible-core version and, on the config file line, the ansible.cfg that was read — None while there is none.
ansible -a
The arguments handed to the module named by -m: the command for command, filter=… for setup.
ansible -i
Names the inventory file — the list of machines and how to reach them — instead of /etc/ansible/hosts, the default path.
ansible -m
The module to run on the targeted hosts: ping to test the SSH-and-Python chain, setup to read facts, command for a raw command.

Lessons that teach it