Compare commits

..

2 commits

Author SHA1 Message Date
c868adc1bd
wip: ansible pull
Some checks failed
/ Ansible Lint (push) Failing after 2m0s
/ Ansible Lint (pull_request) Failing after 1m51s
2025-07-01 03:52:55 +02:00
2e9a9e0339
reboot(role): intro. reboot role, which handles local conns. gracefully
Also use this role instead of plain ansible.builtin.reboot.
This is in preparation for using ansible_pull as we don't want to have
ansible.builtin.reboot fail local playbook runs.
2025-07-01 03:52:55 +02:00
3 changed files with 5 additions and 24 deletions

View file

@ -1,7 +0,0 @@
---
- name: connection test
hosts: all
tasks:
- name: debug
ansible.builtin.debug:
var: ansible_connection

View file

@ -1,15 +0,0 @@
---
- name: reboot test
hosts: all
tasks:
- name: debug before
ansible.builtin.debug:
msg: before
- name: reboot
ansible.builtin.include_role:
name: reboot
- name: debug after
ansible.builtin.debug:
msg: after

View file

@ -1,3 +1,6 @@
- name: reboot the system
become: true
ansible.builtin.reboot:
ansible.builtin.include_role:
role: reboot
vars:
# Simply don't reboot on local connections and rely on proper handling of /var/run/reboot-required.
reboot__local_handling: ignore