diff options
author | Christian Pointner <equinox@spreadspace.org> | 2021-04-23 22:46:12 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2021-04-23 22:46:12 +0200 |
commit | 476c03d6003f21cbf7fd83f18738ab06c1cf6230 (patch) | |
tree | b5cc7c4d1737b71dc6c29628595398df6bbe4596 /roles/streaming/icecast/tasks | |
parent | sgg-icecast: standalone kubelet (diff) |
icecast2 role and test deployment
Diffstat (limited to 'roles/streaming/icecast/tasks')
-rw-r--r-- | roles/streaming/icecast/tasks/main.yml | 40 |
1 files changed, 40 insertions, 0 deletions
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 |