mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2024-11-23 19:06:54 +01:00
Added variable to selectivley skip entire role if needed.
This commit is contained in:
parent
98ae233269
commit
ab9c581a4b
@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
# Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition).
|
# Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition).
|
||||||
|
docker_install: true
|
||||||
docker_edition: 'ce'
|
docker_edition: 'ce'
|
||||||
docker_package: "docker-{{ docker_edition }}"
|
docker_package: "docker-{{ docker_edition }}"
|
||||||
docker_package_state: present
|
docker_package_state: present
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
---
|
---
|
||||||
- name: OS specific setup
|
- name: OS specific setup
|
||||||
include: include: "setup-{{ ansible_os_family }}.yml"
|
include: include: "setup-{{ ansible_os_family }}.yml"
|
||||||
|
when: docker_install
|
||||||
|
|
||||||
- name: Install Docker.
|
- name: Install Docker.
|
||||||
package: name={{ docker_package }} state={{ docker_package_state }}
|
package: name={{ docker_package }} state={{ docker_package_state }}
|
||||||
|
when: docker_install
|
||||||
|
|
||||||
- name: Ensure Docker is started and enabled at boot.
|
- name: Ensure Docker is started and enabled at boot.
|
||||||
service:
|
service:
|
||||||
name: docker
|
name: docker
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
when: docker_install
|
||||||
|
|
||||||
- include: docker-compose.yml
|
- include: docker-compose.yml
|
||||||
when: docker_install_compose
|
when: docker_install_compose
|
||||||
|
Loading…
Reference in New Issue
Block a user