The stack-install role

As you may have already guessed the bulk of this role, it is only tasks that call yum related modules and we have already mentioned that this is going to be changed.

The first part of the role we are going to look at is the content of roles/stack-install/tasks/main.yml. At the moment, this file contains the tasks that install our desired repositories and packages using the yum and yum_repository modules.

We need to update the file, but first, take the existing content and save it as a file called roles/stack-install/tasks/install-centos.yml. Once you have the copied the content, update roles/stack-install/tasks/main.yml so it has this content:

---- name: include the operating system specific variables include_vars: ...

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.