From d5175b4fb930f1ca48e514a4ab8080f050d4c6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Thu, 21 Dec 2023 16:05:17 +0100 Subject: feat(roles/update): add system update role --- roles/update/tasks/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 roles/update/tasks/main.yml (limited to 'roles/update/tasks/main.yml') diff --git a/roles/update/tasks/main.yml b/roles/update/tasks/main.yml new file mode 100644 index 0000000..1719611 --- /dev/null +++ b/roles/update/tasks/main.yml @@ -0,0 +1,16 @@ +--- + +- name: apply system update + ansible.builtin.command: syspatch + register: update_result_system_update + failed_when: + - update_result_system_update.rc > 0 + - update_result_system_update.rc != 2 + changed_when: + - update_result_system_update.rc == 0 + when: ansible_distribution == "OpenBSD" + +- name: apply package update + ansible.builtin.package: + name: "*" + state: latest -- cgit v1.2.3