From 52f5047773827670f1f6fb13f6740062db3a63c0 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Sat, 27 Jan 2024 13:52:29 -0800 Subject: [PATCH] redis --- lotus-land-story/redis.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lotus-land-story/redis.yml 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