ansible/roles/system/tasks/main.yaml
Louis Vallat 4b1403be21
feat: initial commit
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
2022-11-14 08:32:06 +01:00

24 lines
513 B
YAML

---
- name: Update and upgrade packages
ansible.builtin.apt:
update_cache: true
upgrade: true
autoremove: true
- name: Check if reboot required
ansible.builtin.stat:
path: /var/run/reboot-required
register: reboot_required_file
- name: Reboot if required
ansible.builtin.reboot:
msg: Rebooting due to a kernel update
when: reboot_required_file.stat.exists
- name: Disable cron e-mail notifications
ansible.builtin.cron:
name: MAILTO
user: root
env: true
job: ""