46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
|
---
|
||
|
- name: "NAVIDROME | Set up directories"
|
||
|
ansible.builtin.file:
|
||
|
state: directory
|
||
|
path: "{{ item }}"
|
||
|
owner: "{{ ansible_effective_user_id }}"
|
||
|
group: "{{ ansible_effective_group_id }}"
|
||
|
mode: "0750"
|
||
|
with_items:
|
||
|
- "{{ navidrome_skeleton_paths }}"
|
||
|
tags:
|
||
|
- navidrome.configure
|
||
|
become: true
|
||
|
|
||
|
- name: "NAVIDROME | Write configuration files"
|
||
|
ansible.builtin.template:
|
||
|
src: "navidrome/{{ item }}.j2"
|
||
|
dest: "{{ navidrome_docker_path | expanduser | realpath }}/{{ item }}"
|
||
|
mode: '0640'
|
||
|
loop:
|
||
|
- "docker-compose.yml"
|
||
|
- "env.bonob.conf"
|
||
|
- "env.navidrome.conf"
|
||
|
tags:
|
||
|
- navidrome.configure
|
||
|
|
||
|
- name: "NAVIDROME | Check if the music volume exists"
|
||
|
ansible.builtin.stat:
|
||
|
path: "{{ navidrome_music_volume }}"
|
||
|
register: music
|
||
|
tags:
|
||
|
- navidrome.configure
|
||
|
|
||
|
- name: "NAVIDROME | Set up music volume"
|
||
|
ansible.builtin.file:
|
||
|
state: directory
|
||
|
path: "{{ navidrome_music_volume }}"
|
||
|
owner: "{{ ansible_effective_user_id }}"
|
||
|
group: "{{ ansible_effective_group_id }}"
|
||
|
mode: "0750"
|
||
|
tags:
|
||
|
- navidrome.configure
|
||
|
become: true
|
||
|
when: not music.stat.exists
|
||
|
|
||
|
|