@@ -0,0 +1,61 @@ | |||||
- hosts: mpdb, mpdf | |||||
gather_facts: true | |||||
vars: | |||||
path: /var/lib/mpd | |||||
playlist_directory: /playlist/ | |||||
db_file: tag_cache | |||||
log_dir: /var/log/ | |||||
log_file: mpd.log | |||||
pid_file: pid | |||||
state_file: state | |||||
sticker_file: sticker | |||||
user: mpd | |||||
group: nogroup | |||||
bind_to_address: any | |||||
bind_address: any | |||||
mpdport: 6600 | |||||
log_level: default | |||||
gapless_mp3_playback: yes | |||||
save_absolute_paths_in_playlists: yes | |||||
metadata_to_use: artist,album,title,track,name,genre,date,composer,performer,disc | |||||
auto_update: no | |||||
auto_update_depth: 3 | |||||
follow_outside_symlinks: no | |||||
follow_inside_symlinks: no | |||||
zeroconf_enabled: no | |||||
zeroconf_name: mpd | |||||
default_permissions: read,add,control,admin | |||||
stream: music | |||||
stream_port: 6700 | |||||
stream_bind_address: any | |||||
mixer_type: disabled | |||||
replaygain: album | |||||
replaygain_preamp: 0 | |||||
volume_normalization: no | |||||
audio_buffer_size: 2048 | |||||
buffer_before_play: "1%" | |||||
tasks: | |||||
- name: Install davfs on hosts | |||||
apt: | |||||
name: davfs2 | |||||
state: latest | |||||
- name: setup service davfs on host | |||||
template: | |||||
src: davfs.service.j2 | |||||
dest: "/usr/lib/systemd/system/davfs.service" | |||||
mode: 0644 | |||||
owner: root | |||||
group: root | |||||
- name: davfs service start | |||||
systemd: | |||||
name: "davfs" | |||||
state: started | |||||
enabled: yes | |||||
masked: no | |||||
daemon_reload: yes | |||||
handlers: | |||||
- name: Restart DAVFS | |||||
ansible.builtin.service: | |||||
name: davfs | |||||
state: restarted |
@@ -44,11 +44,7 @@ | |||||
name: mpd | name: mpd | ||||
state: latest | state: latest | ||||
update_cache: yes | update_cache: yes | ||||
- name: Install davfs on hosts | |||||
apt: | |||||
name: davfs | |||||
state: latest | |||||
- name: setup config on hosts | |||||
- name: setup config on hosts | |||||
template: | template: | ||||
src: mpdb.conf.j2 | src: mpdb.conf.j2 | ||||
dest: "/etc/mpd.conf" | dest: "/etc/mpd.conf" | ||||
@@ -66,14 +62,7 @@ | |||||
mode: '0755' | mode: '0755' | ||||
notify: | notify: | ||||
- Restart MPD | - Restart MPD | ||||
- name: setup service davfs on host | |||||
template: | |||||
src: davfs.service.j2 | |||||
dest: "/usr/lib/systemd/system/davfs.service" | |||||
mode: 0644 | |||||
owner: root | |||||
group: root | |||||
- name: setup service on hosts | |||||
- name: setup service on hosts | |||||
template: | template: | ||||
src: mpdb.service.j2 | src: mpdb.service.j2 | ||||
dest: "/usr/lib/systemd/system/mpd.service" | dest: "/usr/lib/systemd/system/mpd.service" | ||||
@@ -82,14 +71,7 @@ | |||||
group: root | group: root | ||||
notify: | notify: | ||||
- Restart MPD | - Restart MPD | ||||
- name: davfs service start | |||||
systemd: | |||||
name: "davfs" | |||||
state: started | |||||
enabled: yes | |||||
masked: no | |||||
daemon_reload: yes | |||||
- name: mpd service start | |||||
- name: mpd service start | |||||
systemd: | systemd: | ||||
name: "mpd" | name: "mpd" | ||||
state: started | state: started | ||||
@@ -101,3 +83,6 @@ | |||||
ansible.builtin.service: | ansible.builtin.service: | ||||
name: mpd | name: mpd | ||||
state: restarted | state: restarted | ||||
- name: davfs | |||||
ansible.builtin.import_playbook: davfs.yaml | |||||
@@ -132,3 +132,6 @@ | |||||
ansible.builtin.service: | ansible.builtin.service: | ||||
name: mpd | name: mpd | ||||
state: restarted | state: restarted | ||||
- name: davfs | |||||
ansible.builtin.import_playbook: davfs.yaml | |||||