Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide packages for Redis from redis.io #83

Open
mmaakdotsource opened this issue Apr 26, 2024 · 3 comments
Open

Provide packages for Redis from redis.io #83

mmaakdotsource opened this issue Apr 26, 2024 · 3 comments

Comments

@mmaakdotsource
Copy link

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.

Copy link

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 github-actions bot added the stale label Aug 30, 2024
@mmaakdotsource
Copy link
Author

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

@github-actions github-actions bot removed the stale label Sep 6, 2024
@lamasfoker
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants