diff --git a/playbooks/mpdf.yaml b/playbooks/mpdf.yaml index d2f3af1..0df8632 100644 --- a/playbooks/mpdf.yaml +++ b/playbooks/mpdf.yaml @@ -42,7 +42,6 @@ apt: name: mpd state: present - - name: setup config on hosts template: src: mpdf.conf.j2 @@ -52,3 +51,22 @@ group: root loop: "{{ range(1,count|int + 1) }}" + - name: setup service on hosts + template: + src: mpdf.service.j2 + dest: "/usr/lib/systemd/system/mpdf{{ item }}.service" + mode: 0644 + owner: root + group: root + loop: "{{ range(1,count|int + 1) }}" + + - name: mpd service start + systemd: + name: "mpd{{ item }}" + state: started + enabled: yes + masked: no + daemon_reload: yes + loop: "{{ range(1,count|int + 1) }}" + +