Add update.yml
This commit is contained in:
14
update.yml
Normal file
14
update.yml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
- name: Apply all Linux updates
|
||||||
|
hosts: all
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
- name: Update all packages
|
||||||
|
package:
|
||||||
|
name: "*"
|
||||||
|
state: latest
|
||||||
|
register: update_result
|
||||||
|
|
||||||
|
- name: Reboot if kernel updated
|
||||||
|
reboot:
|
||||||
|
when: update_result.changed
|
||||||
Reference in New Issue
Block a user