xoxys.droneci/tasks/setup.yml
Robert Kaussow e7a91191cb
All checks were successful
continuous-integration/drone/push Build is passing
migrate dependencies to collections
2020-09-25 09:43:04 +02:00

34 lines
991 B
YAML

---
- block:
- name: Ensure service directory exists
file:
path: "{{ droneci_service_directory }}"
state: directory
mode: 0755
- name: Deploy compose file to '{{ droneci_service_directory }}'
template:
src: "services/droneci_compose.yml.j2"
dest: "{{ droneci_service_directory }}/docker-compose.yml"
owner: root
group: root
mode: 0640
validate: "docker-compose -f %s config -q"
- name: Copy license key file is defined
copy:
src: "{{ droneci_license_key }}"
dest: "{{ droneci_service_directory }}/{{ droneci_license_key | basename }}"
mode: 0600
when: droneci_license_key is defined
- name: Ensure Drone is up and running
docker_compose:
project_src: "{{ droneci_service_directory }}"
pull: yes
remove_orphans: yes
stopped: "{{ droneci_service_stopped }}"
state: present
become: True
become_user: root