From e95318bcada0feb1dcdd44773e690b2addc6de38 Mon Sep 17 00:00:00 2001 From: heqnx Date: Sat, 5 Jul 2025 12:23:26 +0300 Subject: added random password --- templates/icecast2/icecast.xml.j2 | 4 ++-- templates/icecast2/ices-playlist.xml.j2 | 2 +- vars/main.yaml | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/icecast2/icecast.xml.j2 b/templates/icecast2/icecast.xml.j2 index 4c665b7..ae50250 100644 --- a/templates/icecast2/icecast.xml.j2 +++ b/templates/icecast2/icecast.xml.j2 @@ -14,10 +14,10 @@ - + {{ random_password }} disabled admin - password + {{ random_password }} localhost diff --git a/templates/icecast2/ices-playlist.xml.j2 b/templates/icecast2/ices-playlist.xml.j2 index ae9a6be..89fc4c9 100644 --- a/templates/icecast2/ices-playlist.xml.j2 +++ b/templates/icecast2/ices-playlist.xml.j2 @@ -27,7 +27,7 @@ localhost 8000 - password + {{ random_password }} /stream 0 60 diff --git a/vars/main.yaml b/vars/main.yaml index 66e7e27..9f8f32c 100644 --- a/vars/main.yaml +++ b/vars/main.yaml @@ -12,3 +12,4 @@ apt_packages: - vim fail2ban_jail_dir: /etc/fail2ban/jail.d +random_password: "{{ ((ansible_date_time.epoch | string) ~ inventory_hostname) | hash('sha1sum') | truncate(32, end='') }}" -- cgit v1.2.3