Create also the music volume if it doesn't exist.
This commit is contained in:
parent
9d2ee07435
commit
cf0ba963e8
@ -15,6 +15,26 @@
|
|||||||
- configuration
|
- configuration
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Check if the music volume exists
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: "{{ navidrome_music_volume }}"
|
||||||
|
register: music
|
||||||
|
tags:
|
||||||
|
- configuration
|
||||||
|
|
||||||
|
- name: 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:
|
||||||
|
- configuration
|
||||||
|
become: true
|
||||||
|
when: not music.stat.exists
|
||||||
|
|
||||||
|
|
||||||
- name: Write configuration files
|
- name: Write configuration files
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: "{{ item }}.j2"
|
src: "{{ item }}.j2"
|
||||||
|
Loading…
Reference in New Issue
Block a user