commited current state
This commit is contained in:
@@ -16,12 +16,15 @@
|
||||
echo "{{ latest_kernel.stdout }}" | grep -c $(uname -r)
|
||||
register: kernel_match
|
||||
changed_when: false
|
||||
ignore_errors: true
|
||||
when: ansible_virtualization_type != 'lxc'
|
||||
failed_when: false
|
||||
when: ansible_facts['virtualization_type'] != 'lxc'
|
||||
|
||||
- name: Mark reboot required if a new kernel is installed
|
||||
set_fact:
|
||||
reboot_required: "yes"
|
||||
changed_when: true
|
||||
notify:
|
||||
- Reboot system
|
||||
when:
|
||||
- ansible_virtualization_type != 'lxc'
|
||||
- kernel_match.stdout == "0"
|
||||
- ansible_facts['virtualization_type'] != 'lxc'
|
||||
- (kernel_match.stdout | int) == 0
|
||||
Reference in New Issue
Block a user