-
Notifications
You must be signed in to change notification settings - Fork 0
Updates Pipeline
A scheduled workflow that keeps the NAS operating system patched and handles safe reboots.
on:
schedule:
- cron: '0 2 * * 2' # Every Tuesday at 02:00 UTC
workflow_dispatch: # Manual trigger availableRuns automatically every Tuesday at 2am UTC. Can also be triggered manually from the Actions tab.
The workflow connects to the NAS (same Azure → KeyVault → WireGuard → SSH pattern as Provisioning) and runs the updates.yml playbook:
| Step | Action |
|---|---|
| 1 |
apt upgrade — full package upgrade |
| 2 | Check /var/run/reboot-required — does the kernel need a reboot? |
| 3 | If yes → safe reboot (waits 5 min for completion, 30 sec post-reboot delay) |
The reboot is conditional — it only happens if the system signals that a reboot is required (typically after kernel or systemd updates):
- name: Check if reboot is needed
stat:
path: /var/run/reboot-required
register: reboot_required
- name: Reboot if required
reboot:
reboot_timeout: 300
post_reboot_delay: 30
when: reboot_required.stat.existsThe 5-minute timeout ensures the workflow doesn't hang forever if the NAS fails to come back. The 30-second post-reboot delay gives services time to fully start before Ansible declares success.
The updates workflow currently only targets the test environment:
matrix:
environment: [test]💡 This is intentional — I validate updates on test before manually running against production. The manual
workflow_dispatchtrigger lets me deploy to production on my terms after confirming test is stable.
No particular reason other than mid-week means:
- Most upstream security patches from the weekend are available
- I have time to notice if something breaks before the weekend
- It avoids Monday (when I might be making other changes)
Overview
Secrets & Networking
Ansible
- Ansible Structure
- Role: Docker
- Role: Storage
- Role: Samba
- Role: NUT Client
- Role: Backup
- Role: Coral TPU
Pipelines
Operations