Robert Kaussow
c4ecbdeaa4
All checks were successful
continuous-integration/drone/push Build is passing
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
---
|
|
- block:
|
|
- name: Install docker engine
|
|
package:
|
|
name: "{{ dockerengine_package }}"
|
|
state: installed
|
|
|
|
- name: Install dependencies
|
|
package:
|
|
name: "{{ item }}"
|
|
state: installed
|
|
loop: "{{ dockerengine_dependencies }}"
|
|
|
|
- name: Install python dependencies
|
|
pip:
|
|
name:
|
|
- docker
|
|
- docker-compose
|
|
|
|
- name: Add docker group
|
|
group:
|
|
name: docker
|
|
state: present
|
|
notify: __docker_restart
|
|
when: dockerengine_docker_group_enabled | bool
|
|
|
|
- name: Deploy config files to setup environment
|
|
template:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
with_items:
|
|
- { src: 'etc/sysconfig/docker.j2', dest: '/etc/sysconfig/{{ dockerengine_package }}' }
|
|
- { src: 'etc/sysconfig/docker-storage-setup.j2', dest: '/etc/sysconfig/{{ dockerengine_package }}-storage-setup' }
|
|
- { src: 'etc/containers/registries.conf.j2', dest: '/etc/containers/registries.conf' }
|
|
loop_control:
|
|
label: "{{ item.dest }}"
|
|
notify: __docker_restart
|
|
|
|
- name: Ensure docker engine is up and running
|
|
service:
|
|
name: "{{ dockerengine_package }}"
|
|
enabled: True
|
|
state: started
|
|
become: True
|
|
become_user: root
|