feat(roles/valkey)!: add a role to install and configure Valkey - #334
Open
NavidSassan wants to merge 2 commits into
Open
feat(roles/valkey)!: add a role to install and configure Valkey#334NavidSassan wants to merge 2 commits into
NavidSassan wants to merge 2 commits into
Conversation
Valkey gets its own role instead of being installed under the Redis name. On RHEL 10 the redis role pointed at /etc/valkey while hardcoding the 'redis' group, so deploying the configuration aborted with "chgrp failed: failed to look up group redis". Red Hat ships no Redis on RHEL 10 at all, so the redis role drops that platform instead of carrying a workaround. The role installs Valkey from the distribution repositories and deploys the configuration template matching the installed version, asserting up front that a template for that version exists. The templates for 7.2, 8.0, 8.1 and 9.0 are taken verbatim from the packages of the respective distributions. Verified with the new molecule scenario on Debian 13, RHEL 8, RHEL 9, RHEL 10, Ubuntu 24.04 and Ubuntu 26.04: converge, verify, idempotence and a second verify pass on every target. Debian 12 and Ubuntu 22.04 ship no Valkey and are not supported. BREAKING CHANGE: The redis role no longer supports RHEL 10. Move those hosts to the valkey role: put them into the lfops_valkey inventory group and rename their redis__* variables to valkey__*.
setup_icinga2_master, setup_mastodon, setup_moodle and setup_nextcloud could not be deployed on RHEL 10, because the redis role they pull in has no support for that platform. They now select the server by OS: Valkey on RHEL 10, Redis everywhere else, which is what the two platforms ship. Both speak the same protocol on the same port, so the applications themselves are configured identically either way. The choice is exposed as a pair of skip variables per playbook, so a host can be pinned to a specific server or opt out of both. Enabling both is not prevented; that is left to the admin. repo_redis is now tied to the redis role, so a Debian host on Valkey does not get the redis.io repository it has no use for.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Valkey gets its own role and playbook instead of being installed under the Redis name.
Why
On RHEL 10 the
redisrole pointed at/etc/valkeywhile hardcoding theredisgroup, sodeploying the configuration aborted:
Red Hat ships no Redis on RHEL 10 at all, so the
redisrole drops that platform instead ofcarrying a workaround.
Changes
valkeyrole. Valkey comes from the distribution repositories, and the configurationtemplate matching the installed version is deployed; the role asserts up front that a template
for that version exists. Templates for 7.2, 8.0, 8.1 and 9.0 are taken verbatim from the
packages of the respective distributions.
playbooks/valkey.yml, wired intoplaybooks/all.yml.extensions/molecule/valkey.redis:vars/RedHat10.ymlremoved, README points RHEL 10 users at thevalkeyrole.CHANGELOG.mdandCOMPATIBILITY.mdupdated.Breaking change
The
redisrole no longer supports RHEL 10. Move those hosts to thevalkeyrole: put them intothe
lfops_valkeyinventory group and rename theirredis__*variables tovalkey__*.Testing
molecule test --scenario-name valkeypasses on Debian 13, RHEL 8, RHEL 9, RHEL 10, Ubuntu 24.04and Ubuntu 26.04: converge, verify, idempotence (
changed=0) and a second verify, on everytarget. Debian 12 and Ubuntu 22.04 ship no Valkey and are not supported.