June 2018
Beginner
578 pages
13h 39m
English
As we are targeting two different operating systems, our tasks/main.yml file needs to look as follows:
---# tasks file for ansible-role-docker- name: include the operating system specific variables include_vars: "{{ ansible_os_family }}.yml"- name: install the stack on centos import_tasks: install-redhat.yml when: ansible_os_family == 'RedHat'- name: install the stack on ubuntu import_tasks: install-ubuntu.yml when: ansible_os_family == 'Debian'
As you can see, this is the same as when we installed our LEMP Stack on the two operating systems in Chapter 6, Targeting Multiple Distributions. The tasks/install-redhat.yml file looks pretty much like the tasks we have used to install Docker in the previous chapters:
---# tasks file for ansible-role-docker ...
Read now
Unlock full access