Added variable to selectivley skip entire role if needed.

This commit is contained in:
Phillip Thurston 2017-08-03 21:12:14 -06:00
parent 98ae233269
commit ab9c581a4b
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,6 @@
---
# Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition).
docker_install: true
docker_edition: 'ce'
docker_package: "docker-{{ docker_edition }}"
docker_package_state: present

View File

@ -1,15 +1,18 @@
---
- name: OS specific setup
include: include: "setup-{{ ansible_os_family }}.yml"
when: docker_install
- name: Install Docker.
package: name={{ docker_package }} state={{ docker_package_state }}
when: docker_install
- name: Ensure Docker is started and enabled at boot.
service:
name: docker
state: started
enabled: yes
when: docker_install
- include: docker-compose.yml
when: docker_install_compose