Skip to content

WIP: reorganize TLS deployment and refactor deployers to use new helpers#869

Draft
hpk42 wants to merge 6 commits intomainfrom
hpk/refactor-deployers
Draft

WIP: reorganize TLS deployment and refactor deployers to use new helpers#869
hpk42 wants to merge 6 commits intomainfrom
hpk/refactor-deployers

Conversation

@hpk42
Copy link
Contributor

@hpk42 hpk42 commented Feb 23, 2026

Addresses #860 (comment) but goes further: all deployers now use the base Deployer.put_file() / put_template() helpers instead of calling files.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" and need_restart |= res.changed)

the PR is WIP because first #860 should be merged.

@hpk42 hpk42 temporarily deployed to staging-ipv4.testrun.org February 23, 2026 03:23 — with GitHub Actions Inactive
@hpk42 hpk42 temporarily deployed to staging2.testrun.org February 23, 2026 03:23 — with GitHub Actions Inactive
@hpk42 hpk42 changed the title WIP: refactor deployers to use put_file/put_template helpers WIP: reorganize TLS deployment and refactor deployers to use new helpers Feb 23, 2026
@hpk42 hpk42 force-pushed the hpk/refactor-deployers branch from 7831333 to c891c27 Compare February 23, 2026 12:27
@hpk42 hpk42 temporarily deployed to staging2.testrun.org February 23, 2026 12:27 — with GitHub Actions Inactive
@hpk42 hpk42 force-pushed the hpk/refactor-deployers branch from c891c27 to 2e69a25 Compare February 23, 2026 14:00
@hpk42 hpk42 temporarily deployed to staging2.testrun.org February 23, 2026 14:00 — with GitHub Actions Inactive
@hpk42 hpk42 temporarily deployed to staging-ipv4.testrun.org February 23, 2026 14:00 — with GitHub Actions Inactive
@hpk42 hpk42 force-pushed the hpk/tls-external branch 3 times, most recently from 3f05a9a to cf7e9fd Compare February 24, 2026 07:54
Base automatically changed from hpk/tls-external to main February 24, 2026 08:44
@hpk42 hpk42 force-pushed the main branch 2 times, most recently from 92a52b9 to e21f2a0 Compare February 24, 2026 08:46
@hpk42 hpk42 force-pushed the hpk/refactor-deployers branch from 2e69a25 to 36e8133 Compare February 24, 2026 10:57
@hpk42 hpk42 temporarily deployed to staging-ipv4.testrun.org February 24, 2026 10:57 — with GitHub Actions Inactive
@hpk42 hpk42 temporarily deployed to staging2.testrun.org February 24, 2026 10:57 — with GitHub Actions Inactive
hpk42 added 6 commits March 6, 2026 11:08
- 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.
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

Successfully merging this pull request may close these issues.

1 participant