aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2023-12-21 16:05:17 +0100
committerRomain Gonçalves <me@rgoncalves.se>2023-12-21 17:27:18 +0100
commitd5175b4fb930f1ca48e514a4ab8080f050d4c6bc (patch)
treede2050743f064b2741e86e5aafd76d3979be4354 /roles
parent8db698df4c9146f6c16e93cefe96e040b2833561 (diff)
downloadrules-d5175b4fb930f1ca48e514a4ab8080f050d4c6bc.tar.gz
feat(roles/update): add system update role
Diffstat (limited to 'roles')
-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.