|
|
@@ -1,7 +1,7 @@ |
|
|
|
- hosts: mpdf |
|
|
|
gather_facts: true |
|
|
|
vars: |
|
|
|
count: 5 |
|
|
|
mpdcount: 5 |
|
|
|
path: /var/lib/mpd |
|
|
|
playlist_directory: /playlist/ |
|
|
|
db_file: tag_cache |
|
|
@@ -51,7 +51,7 @@ |
|
|
|
mode: 0644 |
|
|
|
owner: root |
|
|
|
group: root |
|
|
|
loop: "{{ range(1,count|int + 1) }}" |
|
|
|
loop: "{{ range(1,mpdcount|int + 1) }}" |
|
|
|
- name: mpdf var directory |
|
|
|
file: |
|
|
|
path: "/var/lib/mpd{{ item }}" |
|
|
@@ -67,7 +67,7 @@ |
|
|
|
owner: root |
|
|
|
group: root |
|
|
|
mode: '0755' |
|
|
|
loop: "{{ range(1,count|int + 1) }}" |
|
|
|
loop: "{{ range(1,mpdcount|int + 1) }}" |
|
|
|
# - name: mpdf pid file |
|
|
|
# file: |
|
|
|
# path: "/var/lib/mpd{{ item }}/pid" |
|
|
@@ -83,7 +83,7 @@ |
|
|
|
owner: root |
|
|
|
group: root |
|
|
|
mode: '0755' |
|
|
|
loop: "{{ range(1,count|int + 1) }}" |
|
|
|
loop: "{{ range(1,mpdcount|int + 1) }}" |
|
|
|
- name: copy sticker.sql |
|
|
|
copy: |
|
|
|
src: "/var/lib/mpd/sticker.sql" |
|
|
@@ -91,7 +91,7 @@ |
|
|
|
owner: root |
|
|
|
group: root |
|
|
|
mode: '0644' |
|
|
|
loop: "{{ range(1,count|int + 1) }}" |
|
|
|
loop: "{{ range(1,mpdcount|int + 1) }}" |
|
|
|
- name: setup service on hosts |
|
|
|
template: |
|
|
|
src: mpdf.service.j2 |
|
|
@@ -99,7 +99,7 @@ |
|
|
|
mode: 0644 |
|
|
|
owner: root |
|
|
|
group: root |
|
|
|
loop: "{{ range(1,count|int + 1) }}" |
|
|
|
loop: "{{ range(1,mpdcount|int + 1) }}" |
|
|
|
- name: mpd service start |
|
|
|
systemd: |
|
|
|
name: "mpdf{{ item }}" |
|
|
@@ -107,6 +107,6 @@ |
|
|
|
enabled: yes |
|
|
|
masked: no |
|
|
|
daemon_reload: yes |
|
|
|
loop: "{{ range(1,count|int + 1) }}" |
|
|
|
loop: "{{ range(1,mpdcount|int + 1) }}" |
|
|
|
|
|
|
|
|