aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2024-11-08 17:46:06 +0100
committerRomain Gonçalves <me@rgoncalves.se>2024-11-08 17:46:06 +0100
commit2cfcab54114799ef612c59a04e537d8c44438814 (patch)
treefd13b0a3097f9d94ed22c7bd0e9978e84788d32d /roles
parent39e4d98802a51918e12948efcd29c67d9bfe021f (diff)
downloadrules-2cfcab54114799ef612c59a04e537d8c44438814.tar.gz
feat(roles/upgrade): kickstart upgrade role for openbsd
Diffstat (limited to 'roles')
-rw-r--r--roles/upgrade/tasks/main.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/roles/upgrade/tasks/main.yml b/roles/upgrade/tasks/main.yml
new file mode 100644
index 0000000..c8a041b
--- /dev/null
+++ b/roles/upgrade/tasks/main.yml
@@ -0,0 +1,18 @@
+---
+
+- name: apply system upgrade
+ community.general.sysupgrade:
+ register: upgrade__result_sysupgrade
+
+- name: reboot to apply upgrade
+ ansible.builtin.reboot:
+ reboot_timeout: 1200
+ when: upgrade__result_sysupgrade.changed
+
+- name: apply post-upgrade update
+ ansible.builtin.command: pkg_add -Uu
+ when: upgrade__result_sysupgrade.changed
+
+- name: update dependencies
+ ansible.builtin.include_role:
+ name: update
remember that computers suck.