Ansible#
Resources#
Guides & Docs:#
- Getting started with Ansible
- Ansible best practices: using project-local collections and roles | Jeff Geerling
- Ansible Navigator Documentation
- home - Ansible Lint Documentation
Videos:#
Books:#
- Ansible for DevOps - Jeff Geerling
- Ansible Up & Running
- Demystifying Ansible Automation Platform | Cloud & Networking | eBook
Forums:#
Notes#
Making Ansible Fast#
Enable pipelining in ansible.cfg:
[ssh_connection]
pipelining=True
Note, must have disabled requiretty in target's sudoers confs:
Defaults !requiretty
Ansible configuration#
Typically drop an ansible.cfg in the project directory and manage it with source control (git) alongside all of the other ansible project files. Typical example:
[defaults]
inventory = ./inventory
collections_path = ./collections
roles_path = ./roles
remote_user = ansible
ask_pass = false
[privilege_escalation]
# become = true
become_method = sudo
become_user = root
become_ask_pass = false
Ansible Playbooks#
ansible-playbook
Options#
Dry run:
--check