redis
change
commit 52f5047773827670f1f6fb13f6740062db3a63c0
author Alpha Chen <alpha@kejadlen.dev>
date
parent b0f6f425
diff --git a/lotus-land-story/redis.yml b/lotus-land-story/redis.yml
new file mode 100644
index 0000000..217670a
--- /dev/null
+++ b/lotus-land-story/redis.yml
@@ -0,0 +1,23 @@
+# https://redis.io/docs/install/install-redis/install-redis-on-linux/#install-on-ubuntudebian
+- name: Set up Redis
+  hosts: lotus-land-story
+  tasks:
+
+    - name: Add apt key
+      ansible.builtin.shell: >
+        curl -fsSL https://packages.redis.io/gpg |
+          sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
+      creates: /usr/share/keyrings/redis-archive-keyring.gpg
+
+    - name: Add apt repo
+      ansible.builtin.apt_repository:
+        repo: "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb {{ ansible_distribution_release }} main"
+        state: present
+        filename: redis
+
+    - name: Install Redis
+      ansible.builtin.apt:
+        pkg: redis
+        state: present
+
+# vim: ft=yaml.ansible