This is the code repository for Mastering Ansible Second Edition, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.
This book provides you with the knowledge you need to understand how Ansible 2.1 works at a fundamental level and leverage its advanced capabilities. You'll learn how to encrypt Ansible content at rest and decrypt data at runtime. You will master the advanced features and capabilities required to tackle the complex automation challenges of today and beyond.
All of the code is organized into folders. The commands and instructions will look like the following:
---
- name: play with a {{ var_name }}
hosts: localhost
gather_facts: false
vars:
- var_name: not-mastery
tasks:
- name: set a variable
set_fact:
task_var_name: "defined variable"
- name: task with a {{ task_var_name }}
debug:
msg: "I am mastery task"
- name: second play with a {{ task_var_name }}
hosts: localhost
gather_facts: false
tasks:
- name: task with a {{ runtime_var_name }}
debug:
msg: "I am another mastery task"
Click here if you have any feedback or suggestions.