roles/containers: make navidrome dir have the 'vault' group

This commit is contained in:
dogeystamp 2023-09-26 18:43:51 -04:00
parent 66c6a7d5d2
commit 7f2e74490d
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
2 changed files with 23 additions and 17 deletions

View File

@ -17,23 +17,6 @@
register: user_gitea
when: '"gitea" in groups'
- name: Create Navidrome user
user:
name: navidrome
register: user_navidrome
when: '"navidrome" in groups'
- name: Create Navidrome directories
file:
path: "{{ item }}"
state: directory
owner: navidrome
group: navidrome
mode: "u=rwX,g=rwX,o="
with_items:
- "{{ music_path }}"
- "{{ dataroot }}/navidrome"
- name: Create Syncthing group
group:
name: vault
@ -73,6 +56,28 @@
groups: vault
when: '"syncthing" in groups'
- name: Create Navidrome user
user:
name: navidrome
register: user_navidrome
when: '"navidrome" in groups'
- name: Create Navidrome directory
file:
path: "{{ dataroot }}/navidrome"
state: directory
owner: navidrome
group: navidrome
mode: "u=rwX,g=rwX,o="
- name: Create music directory
file:
path: "{{ music_path }}"
state: directory
owner: navidrome
group: vault
mode: "u=rwX,g=rwX,o="
- name: Create docker-compose directory
ansible.builtin.file:
path: "{{ docker_compose_dir }}"

View File

@ -46,6 +46,7 @@ services:
- {{ vault_path }}/:/vault
- {{ archive_path }}/:/vault_a
- {{ syncthing_conf_dir }}/:/var/syncthing/config
- "{{ music_path }}:/music"
{% endif %}
{% if "navidrome" in group_names %}