ansible-role-redis icon indicating copy to clipboard operation
ansible-role-redis copied to clipboard

Provide packages for Redis from redis.io

Open mmaakdotsource opened this issue 1 year ago • 2 comments
trafficstars

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.

mmaakdotsource avatar Apr 26 '24 13:04 mmaakdotsource

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.

github-actions[bot] avatar Aug 30 '24 15:08 github-actions[bot]

That would be a great improvement please leave open the task.

mmaakdotsource avatar Sep 02 '24 06:09 mmaakdotsource

@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

lamasfoker avatar Oct 28 '24 16:10 lamasfoker

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.

github-actions[bot] avatar Feb 28 '25 15:02 github-actions[bot]

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.

github-actions[bot] avatar May 02 '25 15:05 github-actions[bot]