Commit | Line | Data |
---|---|---|
14cd8ac5 | 1 | --- |
30b28562 KS |
2 | - name: Include OS-specific variables |
3 | ansible.builtin.include_vars: "{{item}}" | |
4 | with_first_found: | |
5 | - files: | |
6 | - "{{ansible_distribution}}-{{ansible_distribution_major_version}}.yml" | |
7 | - "{{ansible_distribution}}-{{ansible_distribution_release}}.yml" | |
8 | - "{{ansible_distribution}}.yml" | |
9 | - "{{ansible_os_family}}.yml" | |
10 | skip: true | |
11 | - name: OS-specific setup | |
12 | ansible.builtin.include_tasks: "{{item}}" | |
13 | with_first_found: | |
14 | - files: | |
15 | - "setup-{{ansible_os_family}}.yml" | |
16 | skip: true | |
14cd8ac5 KS |
17 | - name: Deploy docker network configuration |
18 | block: | |
19 | - name: Create docker configuration directory | |
20 | ansible.builtin.file: | |
21 | path: '/etc/docker' | |
22 | state: 'directory' | |
23 | owner: 'root' | |
24 | group: 'root' | |
25 | mode: '0755' | |
26 | - name: Copy docker configuration | |
27 | ansible.builtin.copy: | |
28 | src: 'daemon.json' | |
29 | dest: '/etc/docker/daemon.json' | |
30 | owner: 'root' | |
31 | group: 'root' | |
32 | mode: '0644' | |
33 | notify: | |
34 | - 'Restart docker' | |
35 | - name: Install docker | |
36 | ansible.builtin.package: | |
37 | name: "{{docker_packages}}" | |
38 | - name: Ensure docker is running | |
39 | ansible.builtin.service: | |
40 | name: 'docker' | |
41 | state: 'started' |