Aktualisisert von Coderberg
This commit is contained in:
parent
8caa3cf881
commit
0ccf139311
41 changed files with 649 additions and 186 deletions
4
roles/lmn_finish/handlers/main.yml
Normal file
4
roles/lmn_finish/handlers/main.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- name: Reboot client
|
||||
ansible.builtin.command:
|
||||
cmd: "shutdown -r -t 60"
|
||||
|
|
@ -6,6 +6,8 @@
|
|||
- "{{ extra_pkgs }}"
|
||||
- "{{ extra_pkgs1 }}"
|
||||
- "{{ extra_pkgs2 }}"
|
||||
tags:
|
||||
- baseinstall
|
||||
|
||||
- name: Add backports for {{ ansible_distribution_release }}
|
||||
ansible.builtin.apt_repository:
|
||||
|
|
@ -27,6 +29,18 @@
|
|||
- "{{ extra_pkgs_bpo2 }}"
|
||||
when: extra_pkgs_bpo | length > 0 or extra_pkgs_bpo1 | length > 0 or extra_pkgs_bpo2 | length > 0
|
||||
|
||||
|
||||
- name: Check if former ansible-stamp exists
|
||||
ansible.builtin.stat:
|
||||
path: /var/local/ansible-stamps
|
||||
register: stamp_exists
|
||||
|
||||
- name: Trigger Reboot if no former ansible-run is found
|
||||
ansible.builtin.debug:
|
||||
msg: "First Ansible-Run on Client - Reboot handler started"
|
||||
changed_when: not stamp_exists.stat.exists
|
||||
notify: "Reboot client"
|
||||
|
||||
- name: Timestamp successfull run and send up-to-date report
|
||||
ansible.builtin.shell:
|
||||
cmd: date --iso-8601=seconds >> /var/local/ansible-stamps && /usr/local/sbin/reporter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue