mirror of
https://github.com/KevinMidboe/playbooks-retailor.git
synced 2026-02-13 04:49:14 +00:00
update system role
This commit is contained in:
@@ -2,22 +2,5 @@
|
||||
- hosts: all
|
||||
gather_facts: yes
|
||||
|
||||
tasks:
|
||||
- name: Perform a dist-upgrade.
|
||||
ansible.builtin.apt:
|
||||
upgrade: dist
|
||||
update_cache: yes
|
||||
|
||||
- name: Check if a reboot is required.
|
||||
ansible.builtin.stat:
|
||||
path: /var/run/reboot-required
|
||||
get_checksum: no
|
||||
register: reboot_required_file
|
||||
|
||||
- name: Reboot the server (if required).
|
||||
ansible.builtin.reboot:
|
||||
when: reboot_required_file.stat.exists == true
|
||||
|
||||
- name: Remove dependencies that are no longer required.
|
||||
ansible.builtin.apt:
|
||||
autoremove: yes
|
||||
roles:
|
||||
- role: roles/update_system
|
||||
|
||||
Reference in New Issue
Block a user