xoxys.droneci_runner_docker/tasks/setup.yml

27 lines
823 B
YAML
Raw Normal View History

2020-06-15 19:15:20 +00:00
---
- 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"
2020-06-15 23:06:52 +00:00
dest: "{{ droneci_runner_docker_service_directory }}/docker-compose.yml"
2020-06-15 19:15:20 +00:00
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