diff options
author | Christian Pointner <equinox@spreadspace.org> | 2021-04-24 19:27:10 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2021-04-24 19:27:10 +0200 |
commit | 8c0ee8bca2cd460080a1c544de92b644c2856925 (patch) | |
tree | 22a3672a134e525999dc6038656c191b6cb72e5c /roles/streaming/icecast/templates | |
parent | sgg-icecast: change icecast contact addr. (diff) |
icecast: make shoutcast compatible configs possible
Diffstat (limited to 'roles/streaming/icecast/templates')
-rw-r--r-- | roles/streaming/icecast/templates/icecast.xml.j2 | 33 | ||||
-rw-r--r-- | roles/streaming/icecast/templates/pod-spec.yml.j2 | 10 |
2 files changed, 31 insertions, 12 deletions
diff --git a/roles/streaming/icecast/templates/icecast.xml.j2 b/roles/streaming/icecast/templates/icecast.xml.j2 index 3bf0044a..60f6000f 100644 --- a/roles/streaming/icecast/templates/icecast.xml.j2 +++ b/roles/streaming/icecast/templates/icecast.xml.j2 @@ -1,9 +1,5 @@ <icecast> <!-- ***** global ***** --> - <listen-socket> - <port>8080</port> - </listen-socket> - <limits> <threadpool>5</threadpool> <queue-size>524288</queue-size> @@ -15,8 +11,12 @@ </limits> <authentication> +{% if 'source_password' in item.value %} <source-password>{{ item.value.source_password }}</source-password> +{% endif %} +{% if 'relay_password' in item.value %} <relay-password>{{ item.value.relay_password }}</relay-password> +{% endif %} <admin-user>{{ item.value.admin.username }}</admin-user> <admin-password>{{ item.value.admin.password }}</admin-password> </authentication> @@ -32,21 +32,34 @@ {% endif %} +<!-- ***** listeners ***** --> +{% for listener in item.value.listeners %} + <listen-socket> + <port>{{ listener.port }}</port> +{% if 'shoutcast_mountpoint' in listener %} + <shoutcast-mount>{{ listener.shoutcast_mountpoint }}</shoutcast-mount> +{% endif %} + </listen-socket> + +{% endfor %} + +{% if 'mountpoints' in item.value %} <!-- ***** mountpoints ***** --> -{% for mountpoint, config in item.value.mountpoints.items() %} +{% for mountpoint, config in item.value.mountpoints.items() %} <mount> <mount-name>{{ mountpoint }}</mount-name> -{% if 'username' in config %} +{% if 'username' in config %} <username>{{ config.username }}</username> -{% endif %} +{% endif %} <password>{{ config.password }}</password> -{% if 'max_listeners' in config %} +{% if 'max_listeners' in config %} <max-listeners>{{ config.max_listeners }}</max-listeners> -{% endif %} +{% endif %} </mount> -{% endfor %} +{% endfor %} +{% endif %} <!-- ***** aux ***** --> <fileserve>1</fileserve> <paths> diff --git a/roles/streaming/icecast/templates/pod-spec.yml.j2 b/roles/streaming/icecast/templates/pod-spec.yml.j2 index 5dc0b086..bac1ac3b 100644 --- a/roles/streaming/icecast/templates/pod-spec.yml.j2 +++ b/roles/streaming/icecast/templates/pod-spec.yml.j2 @@ -22,8 +22,14 @@ containers: mountPath: /srv/logs subPath: logs ports: - - containerPort: 8080 - hostPort: {{ item.value.port }} +{% for listener in item.value.listeners %} + - containerPort: {{ listener.port }} + hostPort: {{ listener.port }} +{% if 'shoutcast_mountpoint' in listener %} + - containerPort: {{ listener.port + 1 }} + hostPort: {{ listener.port + 1 }} +{% endif %} +{% endfor %} volumes: - name: home |