April 2020
Intermediate to advanced
482 pages
15h 16m
English
In this recipe, we start by creating the roles directory within our main folder. By default, when using roles, Ansible will look for roles in the following location in this order:
Consequently, we create the roles folder within our current working directory (ch1_ansible) in order to host all the roles that we will create in this folder. We create the role using the ansible-galaxy command with the init option and the role name (basic_config), which will create the following role structure inside our roles folder:
$ tree roles/roles/└── basic_config ├── defaults │ └── main.yml ├── files ├── handlers │ └── main.yml ├── meta │ └── main.yml ├── README.md ...
Read now
Unlock full access