aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roles/update/tasks/main.yml16
1 files changed, 16 insertions, 0 deletions
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
remember that computers suck.