From 9457306a881cfe476ee0abbdba4f6f1eaa80db9d Mon Sep 17 00:00:00 2001 From: heqnx Date: Sat, 5 Jul 2025 12:21:29 +0300 Subject: initial commit on a working icecast2 setup --- tasks/icecast2_setup.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tasks/icecast2_setup.yaml (limited to 'tasks/icecast2_setup.yaml') diff --git a/tasks/icecast2_setup.yaml b/tasks/icecast2_setup.yaml new file mode 100644 index 0000000..ee8342d --- /dev/null +++ b/tasks/icecast2_setup.yaml @@ -0,0 +1,38 @@ +- name: ensure {{ radio_music_dir }} directory exists + file: + path: "{{ radio_music_dir }}" + state: directory + owner: icecast2 + group: icecast + mode: '0700' + +- name: deploy icecast.xml from template + template: + src: icecast2/icecast.xml.j2 + dest: /etc/icecast2/icecast.xml + owner: root + group: root + mode: '0644' + +- 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' + +- name: restart icecast2 + systemd: + name: icecast2 + state: restarted + enabled: true + when: ansible_service_mgr == 'systemd' -- cgit v1.2.3