xoxys.freshrss_docker/tasks/setup.yml

29 lines
849 B
YAML
Raw Normal View History

2019-10-02 13:48:03 +00:00
---
- block:
- name: Ensure service directory exists
file:
path: "{{ freshrss_service_directory }}"
state: directory
mode: 0755
2019-10-02 13:48:03 +00:00
- name: Deploy compose file to '{{ freshrss_service_directory }}'
template:
2020-06-23 09:10:54 +00:00
src: "services/freshrss_compose.yml.j2"
2019-10-02 13:48:03 +00:00
dest: "{{ freshrss_service_directory }}/docker-compose.yml"
owner: root
group: root
mode: 0640
validate: "docker-compose -f %s config -q"
2019-10-02 13:48:03 +00:00
- name: Ensure service is up and running
docker_compose:
project_src: "{{ freshrss_service_directory }}"
pull: yes
remove_orphans: yes
stopped: "{{ freshrss_service_stopped }}"
state: present
# temp. disable changes; breaks idempotency for whatever reason
changed_when: False
2019-10-02 13:48:03 +00:00
become: True
become_user: root