summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chaos-at-home/ch-testvm-prometheus.yml1
-rw-r--r--inventory/host_vars/ch-testvm-prometheus.yml3
-rw-r--r--roles/redis/server/defaults/main.yml2
-rw-r--r--roles/redis/server/handlers/main.yml5
-rw-r--r--roles/redis/server/tasks/main.yml14
5 files changed, 25 insertions, 0 deletions
diff --git a/chaos-at-home/ch-testvm-prometheus.yml b/chaos-at-home/ch-testvm-prometheus.yml
index aa71d2c3..edd278ea 100644
--- a/chaos-at-home/ch-testvm-prometheus.yml
+++ b/chaos-at-home/ch-testvm-prometheus.yml
@@ -13,6 +13,7 @@
roles:
- role: x509/static-ca/base
- role: nginx/base
+ - role: redis/server
- role: mail/opendkim
- role: mail/rspamd
- role: mail/postfix/base
diff --git a/inventory/host_vars/ch-testvm-prometheus.yml b/inventory/host_vars/ch-testvm-prometheus.yml
index 7355322d..147e0fe3 100644
--- a/inventory/host_vars/ch-testvm-prometheus.yml
+++ b/inventory/host_vars/ch-testvm-prometheus.yml
@@ -41,6 +41,9 @@ sshd_allowusers_host: "{{ normal_users_host | union(admin_users_host) | union(['
## test
+redis_server_legacy_auth_password: "changeme"
+
+
opendkim_admin_mail: postmaster@chaox.org
opendkim_internal_hosts:
- 127.0.0.1
diff --git a/roles/redis/server/defaults/main.yml b/roles/redis/server/defaults/main.yml
new file mode 100644
index 00000000..b67716c7
--- /dev/null
+++ b/roles/redis/server/defaults/main.yml
@@ -0,0 +1,2 @@
+---
+# redis_server_legacy_auth_password: "very-secret"
diff --git a/roles/redis/server/handlers/main.yml b/roles/redis/server/handlers/main.yml
new file mode 100644
index 00000000..d0271f7f
--- /dev/null
+++ b/roles/redis/server/handlers/main.yml
@@ -0,0 +1,5 @@
+---
+- name: restart redis-server
+ service:
+ name: redis-server
+ state: restarted
diff --git a/roles/redis/server/tasks/main.yml b/roles/redis/server/tasks/main.yml
new file mode 100644
index 00000000..8114bced
--- /dev/null
+++ b/roles/redis/server/tasks/main.yml
@@ -0,0 +1,14 @@
+---
+- name: install redis-server packages
+ apt:
+ name:
+ - redis-server
+ state: present
+
+- name: configure legacy authentication password
+ when: redis_server_legacy_auth_password is defined
+ lineinfile:
+ regexp: '^#?\s*requirepass\s'
+ line: requirepass {{ redis_server_legacy_auth_password }}
+ path: /etc/redis/redis.conf
+ notify: restart redis-server