Compare commits

1 Commits
Author SHA1 Message Date
Defame1297 4201300291 refactor(system_baseline): give the role's internal registers the __ prefix
Build / build (pull_request) Waiting to run
Lint / lint (pull_request) Waiting to run
Molecule / molecule (pull_request) Waiting to run
The unattended-upgrades check and the reboot-required stat registered results under
names that read as role inputs. Internal register and set_fact results are
__system_baseline_; the documented system_baseline_reboot_required output keeps its name.

Assisted-by: Claude Code
2026-11-28 23:21:56 +00:00
3 changed files with 9 additions and 4 deletions

No files matched your search

@@ -0,0 +1,5 @@
---
trivial:
- >-
system_baseline - The registered results of the unattended-upgrades check and the reboot-required
check carry the internal ``__system_baseline_`` prefix.
+2 -2
View File
@@ -9,11 +9,11 @@
- name: Check if reboot is required (Debian)
ansible.builtin.stat:
path: /var/run/reboot-required
register: system_baseline_reboot_required_file
register: __system_baseline_reboot_required_file
- name: Set system_baseline_reboot_required fact
ansible.builtin.set_fact:
system_baseline_reboot_required: "{{ system_baseline_reboot_required_file.stat.exists }}"
system_baseline_reboot_required: "{{ __system_baseline_reboot_required_file.stat.exists }}"
- name: Reboot the server if required
ansible.builtin.reboot:
@@ -60,6 +60,6 @@
- name: Validate unattended-upgrades config
become: true
ansible.builtin.command: unattended-upgrades --dry-run --debug
register: system_baseline_unattended_check
register: __system_baseline_unattended_check
changed_when: false
failed_when: system_baseline_unattended_check.rc != 0
failed_when: __system_baseline_unattended_check.rc != 0