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:
src: "services/freshrss-compose.yml.j2"
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