WIP: reorganize TLS deployment and refactor deployers to use new helpers#869
Draft
WIP: reorganize TLS deployment and refactor deployers to use new helpers#869
Conversation
d252967 to
19249b8
Compare
7831333 to
c891c27
Compare
19249b8 to
821ae5b
Compare
c891c27 to
2e69a25
Compare
3f05a9a to
cf7e9fd
Compare
92a52b9 to
e21f2a0
Compare
2e69a25 to
36e8133
Compare
- Move acmetool, external and selfsigned deployers into tls/ subdirectory with a common TlsDeployer base class and get_tls_deployers() entry point. - Add put_file and put_template helpers to Deployer base class for automatic restart tracking. - Clean up legacy acmetool configuration files.
- New helper derives dest path from src filename, dispatches to put_file or put_template based on .j2 suffix, and inherits the enabled/disabled removal behavior from those helpers. - Migrate TurnDeployer, FiltermailDeployer, MtailDeployer, AcmetoolDeployer, and ExternalTlsDeployer to use it. - Add unit tests covering plain files, templates, disabled removal, and explicit dest_name override. - Reformat all Deployer docstrings with semantic linebreaks.
- New helper encapsulates systemd.service(), auto-generates the name, wires need_restart/daemon_reload, and resets both flags. - Migrate 11 activate() methods across 9 deployers to use it. - Remove now-unused systemd/files imports from 7 deployer files. - Add unit tests covering start, stop, no-change, and multi-call flag-reset scenarios.
36e8133 to
4302126
Compare
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.
Addresses #860 (comment) but goes further: all deployers now use the base
Deployer.put_file()/put_template()helpers instead of callingfiles.put()/files.template()directly. This simplifies the change-tracking logic (need_restart) across the board — the helpers handle it automatically, with a net reduction of ~80 lines of boilerplate (user="root", group="root", mode="644"andneed_restart |= res.changed)the PR is WIP because first #860 should be merged.