2019-10-02 13:48:03 +00:00
|
|
|
---
|
|
|
|
- block:
|
2020-06-17 20:32:10 +00:00
|
|
|
- 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:
|
|
|
|
src: "services/freshrss-compose.yml.j2"
|
|
|
|
dest: "{{ freshrss_service_directory }}/docker-compose.yml"
|
|
|
|
owner: root
|
|
|
|
group: root
|
2020-06-17 20:32:10 +00:00
|
|
|
mode: 0640
|
|
|
|
validate: "docker-compose -f %s config -q"
|
2019-10-02 13:48:03 +00:00
|
|
|
|
2020-06-17 20:32:10 +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
|