miniflux: add docker compose config
This commit is contained in:
parent
86f741c3e9
commit
b1d70248f1
7 changed files with 122 additions and 14 deletions
43
roles/miniflux/tasks/main.yml
Normal file
43
roles/miniflux/tasks/main.yml
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
- 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'
|
||||
Loading…
Add table
Add a link
Reference in a new issue