Add lego_version parameter and update to lego 5.x#5
Merged
Conversation
Always using `latest` is not a good idea. It makes the Ansible playbook not reproducible easily (see whole lock file discussion). But it also runs the risk of lego releasing a new major version that this role is incompatible with. This happened with the release of lego 5. I decided to make this variable required for exactly those reasons.
The CLI changed quite a bit, combining the `run` and `renew` commands into one.
333f959 to
11ad9a6
Compare
This is just strictly more powerful than what we had before. Sometimes it's necessary to do multiple things as a hook. And of course, the user of this role could write this script file somewhere, but that is usually very inconvenient as it has to be done before this role runs, but then where to put the script? Integrating it into this role solves this.
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.
See commits.
Re the 5.x update: See https://ldez.github.io/blog/2026/05/11/lego-v5/ for an overview. I'm pretty sure this role can be simplified a bit with 5.x in mind. 5.x unified
renewandruncommands and also supports config files, so maybe thelego-renew.shmight not be necessary anymore? But I didn't have the time to look further into this. I just did the minimum to make it work with 5.x