summaryrefslogtreecommitdiff
path: root/tasks/icecast2_setup.yaml
diff options
context:
space:
mode:
authorheqnx <root@heqnx.com>2025-07-06 14:57:39 +0300
committerheqnx <root@heqnx.com>2025-07-06 14:57:39 +0300
commita064cbda2086b79b6cc04111cb308a6b2d770aa6 (patch)
tree9b2c6aa08775aaae76420f9ad8d6baaf728bbe24 /tasks/icecast2_setup.yaml
parent3559ca8a720086f080286e887a29b6fa68810fa9 (diff)
downloadansible-icecast2-a064cbda2086b79b6cc04111cb308a6b2d770aa6.tar.gz
ansible-icecast2-a064cbda2086b79b6cc04111cb308a6b2d770aa6.zip
replaced ices2 which only supports vorbis, with liquidsoap + creation of title metadata; reorganized templates
Diffstat (limited to 'tasks/icecast2_setup.yaml')
-rw-r--r--tasks/icecast2_setup.yaml69
1 files changed, 56 insertions, 13 deletions
diff --git a/tasks/icecast2_setup.yaml b/tasks/icecast2_setup.yaml
index ee8342d..506c537 100644
--- a/tasks/icecast2_setup.yaml
+++ b/tasks/icecast2_setup.yaml
@@ -6,33 +6,76 @@
group: icecast
mode: '0700'
+- name: ensure {{ radio_music_dir }}/tracks directory exists
+ file:
+ path: "{{ radio_music_dir }}/tracks"
+ state: directory
+ owner: icecast2
+ group: icecast
+ mode: '0700'
+
+- name: ensure {{ radio_music_dir }}/logs directory exists
+ file:
+ path: "{{ radio_music_dir }}/logs"
+ state: directory
+ owner: icecast2
+ group: icecast
+ mode: '0700'
+
- name: deploy icecast.xml from template
template:
- src: icecast2/icecast.xml.j2
+ src: etc/icecast2/icecast.xml.j2
dest: /etc/icecast2/icecast.xml
owner: root
group: root
mode: '0644'
-- name: deploy ices-playlist.xml.j2 from template
+- name: deploy radio.liq from template
template:
- src: icecast2/ices-playlist.xml.j2
- dest: /etc/icecast2/ices-playlist.xml
- owner: root
- group: root
- mode: '0644'
+ src: srv/radio/radio.liq.j2
+ dest: "{{ radio_music_dir }}/radio.liq"
+ owner: icecast2
+ group: icecast
+ mode: '0744'
-- name: deploy mp3-to-ogg.sh from template
+- name: deploy liquidsoap-radio.service from template
template:
- src: icecast2/mp3-to-ogg.sh.j2
- dest: /etc/icecast2/mp3-to-ogg.sh
- owner: root
- group: root
+ src: etc/systemd/system/liquidsoap-radio.service
+ dest: /etc/systemd/system/liquidsoap-radio.service
+ owner: icecast2
+ group: icecast
mode: '0744'
-- name: restart icecast2
+- name: reload systemd daemon
+ systemd:
+ daemon_reload: yes
+
+- name: restart and enable icecast2
systemd:
name: icecast2
state: restarted
enabled: true
when: ansible_service_mgr == 'systemd'
+
+- name: restart and enable liquidsoap-radio
+ systemd:
+ name: liquidsoap-radio
+ state: restarted
+ enabled: true
+ when: ansible_service_mgr == 'systemd'
+
+#- name: deploy ices-playlist.xml.j2 from template
+# template:
+# src: icecast2/ices-playlist.xml.j2
+# dest: /etc/icecast2/ices-playlist.xml
+# owner: root
+# group: root
+# mode: '0644'
+
+#- name: deploy mp3-to-ogg.sh from template
+# template:
+# src: icecast2/mp3-to-ogg.sh.j2
+# dest: /etc/icecast2/mp3-to-ogg.sh
+# owner: root
+# group: root
+# mode: '0744'