Преглед на файлове

working on changes, and debugging

master
Erin Sims преди 2 години
родител
ревизия
5ef60498c1
променени са 2 файла, в които са добавени 30 реда и са изтрити 4 реда
  1. +13
    -3
      playbooks/mpdb.yaml
  2. +17
    -1
      playbooks/mpdf.yaml

+ 13
- 3
playbooks/mpdb.yaml Целия файл

@@ -51,6 +51,8 @@
mode: 0644 mode: 0644
owner: root owner: root
group: root group: root
notify:
- Restart MPD
- name: mpdf music directory - name: mpdf music directory
file: file:
path: "/var/lib/mpd/music" path: "/var/lib/mpd/music"
@@ -58,13 +60,18 @@
owner: root owner: root
group: root group: root
mode: '0755' mode: '0755'
notify:
- Restart MPD

- 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"
mode: 0644 mode: 0644
owner: root owner: root
group: root
group: root
notify:
- Restart MPD
- name: mpd service start - name: mpd service start
systemd: systemd:
name: "mpd" name: "mpd"
@@ -72,5 +79,8 @@
enabled: yes enabled: yes
masked: no masked: no
daemon_reload: yes daemon_reload: yes


handlers:
- name: Restart MPD
ansible.builtin.service:
name: mpd
state: restarted

+ 17
- 1
playbooks/mpdf.yaml Целия файл

@@ -57,6 +57,8 @@
mode: 0644 mode: 0644
owner: root owner: root
group: root group: root
notify:
- Restart MPD
loop: "{{ range(1,mpdcount|int + 1) }}" loop: "{{ range(1,mpdcount|int + 1) }}"
- name: mpdf var directory - name: mpdf var directory
file: file:
@@ -65,6 +67,8 @@
owner: root owner: root
group: root group: root
mode: '0777' mode: '0777'
notify:
- Restart MPD
loop: "{{ range(1,mpdcount|int + 1) }}" loop: "{{ range(1,mpdcount|int + 1) }}"
- name: mpdf playlist directory - name: mpdf playlist directory
file: file:
@@ -73,6 +77,8 @@
owner: root owner: root
group: root group: root
mode: '0755' mode: '0755'
notify:
- Restart MPD
loop: "{{ range(1,mpdcount|int + 1) }}" loop: "{{ range(1,mpdcount|int + 1) }}"
# - name: mpdf pid file # - name: mpdf pid file
# file: # file:
@@ -89,6 +95,8 @@
owner: root owner: root
group: root group: root
mode: '0755' mode: '0755'
notify:
- Restart MPD
loop: "{{ range(1,mpdcount|int + 1) }}" loop: "{{ range(1,mpdcount|int + 1) }}"
- name: copy sticker.sql - name: copy sticker.sql
copy: copy:
@@ -97,6 +105,8 @@
owner: root owner: root
group: root group: root
mode: '0644' mode: '0644'
notify:
- Restart MPD
loop: "{{ range(1,mpdcount|int + 1) }}" loop: "{{ range(1,mpdcount|int + 1) }}"
- name: setup service on hosts - name: setup service on hosts
template: template:
@@ -106,6 +116,8 @@
owner: root owner: root
group: root group: root
loop: "{{ range(1,mpdcount|int + 1) }}" loop: "{{ range(1,mpdcount|int + 1) }}"
notify:
- Restart MPD
- name: mpd service start - name: mpd service start
systemd: systemd:
name: "mpdf{{ item }}" name: "mpdf{{ item }}"
@@ -115,4 +127,8 @@
daemon_reload: yes daemon_reload: yes
loop: "{{ range(1,mpdcount|int + 1) }}" loop: "{{ range(1,mpdcount|int + 1) }}"



handlers:
- name: Restart MPD
ansible.builtin.service:
name: mpd
state: restarted

Зареждане…
Отказ
Запис