ansible-role-redis
ansible-role-redis copied to clipboard
Provide packages for Redis from redis.io
Hi,
i would be nice if this ansible role provide a possibility to got redis packes from the redis.io repository. Currently Debian Std. Repo provides redis 6.0.x and debian backport 7.0.x. On redis.io, redis is available up to 7.2.x.
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
That would be a great improvement please leave open the task.
@mmaakdotsource I have done something like this to be able to download the correct redis version on Ubuntu/Debian:
- name: "Redis {{ redis_version }}"
hosts: all
become: true
pre_tasks:
- name: Download Redis GPG key and save as dearmored file
shell: "curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg"
args:
creates: /usr/share/keyrings/redis-archive-keyring.gpg
- name: Set permissions for the GPG key
file:
path: /usr/share/keyrings/redis-archive-keyring.gpg
mode: '0644'
- name: Add Redis APT repository
shell: "echo 'deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb {{ ansible_lsb.codename }} main' | tee /etc/apt/sources.list.d/redis.list"
args:
creates: /etc/apt/sources.list.d/redis.list
- name: Ensure required packages are installed
apt:
name:
- lsb-release
- curl
- gpg
- "redis-tools=6:{{ redis_version }}*"
- "redis-server=6:{{ redis_version }}*"
state: present
update_cache: yes
- name: Add vm.overcommit_memory to sysctl.conf
lineinfile:
path: /etc/sysctl.conf
regexp: '^vm.overcommit_memory='
line: 'vm.overcommit_memory=1'
state: present
- name: Reload sysctl to apply changes from sysctl.conf
command: sysctl -p
roles:
- role: geerlingguy.redis
vars:
redis_package: "redis=6:{{ redis_version }}*"
redis_databases: 3
redis_extra_config: |
lazyfree-lazy-eviction yes
lazyfree-lazy-expire yes
lazyfree-lazy-server-del yes
replica-lazy-flush yes
lazyfree-lazy-user-del yes
supervised systemd
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.