1
Positioning of Ansible
- Ansible and DevOps.
- Devops & IaC (Infrastructure as Code), the source code of the infrastructure.
- The tools Puppet, Chef, Saltstack, etc. Ansible.
- How Ansible works.
- Architecture: inventory, modules, playbooks, tasks, roles.
2
Installation and configuration
- Installing and getting started with the tool.
- The basic commands of Ansible.
- Node configuration: ssh keys, sudo privilege escalation.
- The configuration file.
- The inventory: creation and use.
Hands-on work
Installing Ansible and configuring several client nodes, creating inventory and using the main commands.
3
Ad Hoc orders
- Parallelism and Shell commands.
- File transfers.
- Packages with yum, apt.
- Users and groups.
- Services.
Hands-on work
Use of different Ad hoc commands in parallel on multiple nodes.
4
Playbooks
- Introduction to playbooks.
- Definition of tasks, plays.
- Yaml syntax.
- Variables, modules and tasks.
- Executing a playbook.
- Testing a playbook in a dry-run.
- Step-by-step execution, skipping tasks.
- Managing errors.
Hands-on work
Writing a simple playbook composed of several tasks.
5
Writing modular code
- Notifications and Handlers.
- Roles and includes. Tags.
- Community modules.
- Ansible-galaxy: Share your code.
Hands-on work
Explore the Ansible galaxy, downloading and using modules, adding tags to a playbook.
6
Advanced commands
- Vault: data encryption.
- Lookups.
- Developing your own modules, debugbing a module, plug-ins.
- Creating your own filters.
Hands-on work
7
- Writing a playbook
- Variables. Templates and filters.
- Control structures: conditions, loops and blocks.
- Prompts. Facts.
- Writing playbooks.