computer-playbook/roles/docker/tasks/main.yml

36 lines
822 B
YAML
Raw Normal View History

2020-12-24 14:27:31 +01:00
---
2023-11-16 12:26:27 +01:00
2020-12-24 14:27:31 +01:00
- name: docker & docker compose install
pacman:
2023-04-19 00:03:13 +02:00
name: ['docker','docker-compose']
2020-12-24 14:27:31 +01:00
state: present
notify: docker restart
when: run_once_docker is not defined
2020-12-24 14:27:31 +01:00
2023-12-07 16:56:43 +01:00
- name: "create {{path_docker_compose_instances}}"
2021-10-18 18:46:58 +02:00
file:
2023-12-07 16:56:43 +01:00
path: "{{path_docker_compose_instances}}"
2021-10-18 18:46:58 +02:00
state: directory
mode: 0700
owner: administrator
group: administrator
when: run_once_docker is not defined
2021-10-18 18:46:58 +02:00
2023-04-26 11:52:11 +02:00
- name: "create {{path_docker_volumes}}"
2021-10-18 18:46:58 +02:00
file:
2023-04-26 11:52:11 +02:00
path: "{{path_docker_volumes}}"
2021-10-18 18:46:58 +02:00
state: directory
mode: 0700
owner: administrator
group: administrator
when: run_once_docker is not defined
2021-10-18 18:46:58 +02:00
2020-12-24 14:27:31 +01:00
- name: flush docker service
meta: flush_handlers
when: run_once_docker is not defined
- name: run the docker tasks once
set_fact:
run_once_docker: true
when: run_once_docker is not defined