1 #####################################
2 ### someone's ansible provisioner ###
3 #####################################
4 # Part of: https://git.somenet.org/root/pub/somesible.git
5 # 2017-2024 by someone <someone@somenet.org>
8 - name: install docker and docker-compose
16 ignore_errors: "{{ignore_online_errors | bool}}"
19 - name: copy daemon.json to /etc/docker/daemon.json
22 dest: "/etc/docker/daemon.json"
27 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/daemon.json"
28 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/daemon.json"
29 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/daemon.json"
30 - "default/daemon.json"
31 notify: restart docker.service
34 - name: copy docker-compose.target to /etc/systemd/system/
37 dest: "/etc/systemd/system/docker-compose.target"
42 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/docker-compose.target"
43 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/docker-compose.target"
44 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/docker-compose.target"
45 - "default/docker-compose.target"
46 notify: restart docker-compose.target
49 - name: copy docker-compose@.service to /etc/systemd/system/
52 dest: "/etc/systemd/system/docker-compose@.service"
57 - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/docker-compose@.service"
58 - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/docker-compose@.service"
59 - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/docker-compose@.service"
60 - "default/docker-compose@.service"
61 notify: restart docker-compose.target
64 - name: enable and start docker.service
65 include_role: name="base/systemd/enable-and-start"
67 service_name: docker.service