The stack-config role

A lot of the modules we are using in this role will work fine on both of our target operating systems, so in this role, we are tweaking things like paths to configuration files and so on. Rather than list out the entire content of the roles/stack-config/tasks/main.yml file, I will just highlight the changes that need to be made, starting with the following task that should be right at the top of the file:

- name: include the operating system specific variables  include_vars: "{{ ansible_os_family }}.yml"

This will load in the variables that contain the paths we need to use later in the role; the content of roles/stack-config/vars/RedHat.yml is:

---php_fpm_path: "/etc/php-fpm.d/www.conf"php_ini_path: /etc/php.iniphp_service_name: ...

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.