xoxys.droneci_runner_docker/tasks/setup.yml
Robert Kaussow 133859a358
All checks were successful
continuous-integration/drone/push Build is passing
migrate dependencies to collections
2020-09-25 10:20:52 +02:00

27 lines
823 B
YAML

---
- block:
- name: Ensure service directory exists
file:
path: "{{ droneci_runner_docker_service_directory }}"
state: directory
mode: 0755
- name: Deploy compose file to '{{ droneci_runner_docker_service_directory }}'
template:
src: "services/droneci_runner_compose.yml.j2"
dest: "{{ droneci_runner_docker_service_directory }}/docker-compose.yml"
owner: root
group: root
mode: 0640
validate: "docker-compose -f %s config -q"
- name: Ensure runner is up and running
docker_compose:
project_src: "{{ droneci_runner_docker_service_directory }}"
pull: yes
remove_orphans: yes
stopped: "{{ droneci_runner_docker_service_stopped }}"
state: present
become: True
become_user: root