Skip to content

Add configurable unattended reboot orchestration with optional k3s drain hooks#2

Open
Copilot wants to merge 10 commits into
mainfrom
copilot/add-k3s-pre-reboot-drain-script
Open

Add configurable unattended reboot orchestration with optional k3s drain hooks#2
Copilot wants to merge 10 commits into
mainfrom
copilot/add-k3s-pre-reboot-drain-script

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

No description provided.

@alexlanz alexlanz marked this pull request as ready for review May 11, 2026 11:44
@alexlanz alexlanz requested review from ThoSap and stplasim and removed request for alexlanz May 11, 2026 11:45
Copy link
Copy Markdown

@ThoSap ThoSap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM 👍🏼

Comment thread defaults/main.yml
Comment thread tasks/main.yml
Comment thread tasks/main.yml
Comment thread tasks/main.yml
when: base_unattended_update_enabled

- name: Create unattended-upgrades pre-reboot hooks directory
ansible.builtin.file:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overrides the entire file, right? It also removes all the default settings, such as allowed origins and package blacklists. Is this what we want? Maybe we should check first to see if it would remove something that we still need or want.

https://github.com/mvo5/unattended-upgrades/blob/master/data/50unattended-upgrades.Ubuntu

Comment thread tasks/main.yml
mode: '0755'
content: |
#!/bin/bash
set -euo pipefail
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand this right, the set -euo pipefail and if ! "$hook" are working against each other here, one says fail fast, the other is clearly trying to keep going after a failure.

Currently it would run them all, fail at the end. Is this intentional?

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.

4 participants