summaryrefslogtreecommitdiffstats
path: root/deployment/playbooks/roles/docker-storage-setup/tasks/main.yaml
blob: 70c04802f0059f28276fb5a059996a5f94424459 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
- name: remove any existing docker-storage config file
  file:
    path: /etc/sysconfig/docker-storage
    state: absent
  when: not (openshift_use_crio | default(false) | bool)

- block:
    - name: create the docker-storage config file
      template:
        src: "{{ role_path }}/templates/docker-storage-setup-overlayfs.j2"
        dest: /etc/sysconfig/docker-storage-setup
        owner: root
        group: root
        mode: 0644
  when:
    - ansible_distribution_version | version_compare('7.4', '>=')
    - ansible_distribution == "RedHat"
    - not (openshift_use_crio | default(false) | bool)

- block:
    - name: create the docker-storage-setup config file
      template:
        src: "{{ role_path }}/templates/docker-storage-setup-dm.j2"
        dest: /etc/sysconfig/docker-storage-setup
        owner: root
        group: root
        mode: 0644
  when:
    - ansible_distribution_version | version_compare('7.4', '<')
    - ansible_distribution == "RedHat"
    - not (openshift_use_crio | default(false) | bool)

- name: start docker
  service:
    name: docker
    state: started
    enabled: true
  when: not (openshift_use_crio | default(false) | bool)