44 lines
977 B
YAML
44 lines
977 B
YAML
|
---
|
||
|
- name: Ensure data directory is present
|
||
|
ansible.builtin.file:
|
||
|
path: '/mnt/data1/miniflux'
|
||
|
state: directory
|
||
|
mode: '0755'
|
||
|
owner: 'root'
|
||
|
group: 'root'
|
||
|
|
||
|
- name: Ensure data subvolumes are present
|
||
|
community.general.btrfs_subvolume:
|
||
|
name: '/miniflux/{{ item }}'
|
||
|
with_items:
|
||
|
- 'postgres'
|
||
|
|
||
|
- name: Ensure configuration directory is present
|
||
|
file:
|
||
|
path: '/etc/miniflux'
|
||
|
state: directory
|
||
|
mode: '0755'
|
||
|
|
||
|
- name: Ensure compose file is present
|
||
|
template:
|
||
|
src: 'compose.yml.j2'
|
||
|
dest: '/etc/miniflux/compose.yml'
|
||
|
mode: '0644'
|
||
|
owner: 'root'
|
||
|
group: 'root'
|
||
|
register: res
|
||
|
|
||
|
- name: Ensure stack is deployed
|
||
|
ansible.builtin.shell:
|
||
|
chdir: '/etc/miniflux'
|
||
|
cmd: 'docker compose up -d --remove-orphans'
|
||
|
when: 'res.changed'
|
||
|
|
||
|
- name: Ensure backup script is present
|
||
|
ansible.builtin.copy:
|
||
|
src: 'miniflux.backup.sh'
|
||
|
dest: '/etc/backups/miniflux.backup.sh'
|
||
|
owner: 'root'
|
||
|
group: 'root'
|
||
|
mode: '0644'
|