changed tasks to perform on update
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
name: "*"
|
||||
state: latest
|
||||
|
||||
- name: upgrade OS (dist-upgrade)
|
||||
- name: upgrade OS (full-upgrade)
|
||||
apt:
|
||||
upgrade: dist
|
||||
|
||||
@@ -17,15 +17,22 @@
|
||||
apt:
|
||||
autoremove: true
|
||||
|
||||
#- name: reset state of check_mk check
|
||||
# file:
|
||||
# path: "{{ item }}"
|
||||
# state: absent
|
||||
# with_fileglob:
|
||||
# - "/var/lib/check_mk_agent/cache/plugins_86400\\mk_apt.cache"
|
||||
- name: Check if a reboot is required
|
||||
register: reboot_required_file
|
||||
stat: path=/var/run/reboot-required get_checksum=no
|
||||
|
||||
- name: reset state of check_mk check
|
||||
file:
|
||||
path: /var/lib/check_mk_agent/cache/plugins_mk_apt.cache
|
||||
state: touch
|
||||
modification_time: "202001010101.01"
|
||||
- name: Reboot Server
|
||||
reboot:
|
||||
msg: "Reboot initiated by Ansible due to kernel updates"
|
||||
connect_timeout: 5
|
||||
reboot_timeout: 300
|
||||
pre_reboot_delay: 0
|
||||
post_reboot_delay: 30
|
||||
test_command: uptime
|
||||
when: reboot_required_file.stat.exists
|
||||
|
||||
# - name: reset state of check_mk check
|
||||
# file:
|
||||
# path: /var/lib/check_mk_agent/cache/plugins_mk_apt.cache
|
||||
# state: touch
|
||||
# modification_time: "202001010101.01"
|
||||
|
||||
Reference in New Issue
Block a user