From 476c03d6003f21cbf7fd83f18738ab06c1cf6230 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 23 Apr 2021 22:46:12 +0200 Subject: icecast2 role and test deployment --- roles/streaming/icecast/tasks/main.yml | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 roles/streaming/icecast/tasks/main.yml (limited to 'roles/streaming/icecast/tasks') diff --git a/roles/streaming/icecast/tasks/main.yml b/roles/streaming/icecast/tasks/main.yml new file mode 100644 index 00000000..cbd9f909 --- /dev/null +++ b/roles/streaming/icecast/tasks/main.yml @@ -0,0 +1,40 @@ +--- +- name: create icecast instance directory + loop: "{{ icecast_instances | list }}" + file: + path: "{{ icecast_base_path }}/{{ item }}" + state: directory + +- name: create icecast log directory + loop: "{{ icecast_instances | list }}" + file: + dest: "{{ icecast_base_path }}/{{ item }}/logs" + state: directory + owner: app + group: app + +- name: generate icecast config + loop: "{{ icecast_instances | dict2items }}" + loop_control: + label: "{{ item.key }}" + template: + src: icecast.xml.j2 + dest: "{{ icecast_base_path }}/{{ item.key }}/icecast.xml" + owner: root + group: app + mode: 0640 + +- name: install pod manifest + loop: "{{ icecast_instances | dict2items }}" + loop_control: + label: "{{ item.key }}" + vars: + kubernetes_standalone_pod: + name: "icecast-{{ item.key }}" + spec: "{{ lookup('template', 'pod-spec.yml.j2') }}" + config_hash_items: + - path: "{{ icecast_base_path }}/{{ item.key }}/icecast.xml" + properties: + - checksum + include_role: + name: kubernetes/standalone/pod -- cgit v1.2.3