diff options
author | Romain Gonçalves <me@rgoncalves.se> | 2023-12-21 16:05:17 +0100 |
---|---|---|
committer | Romain Gonçalves <me@rgoncalves.se> | 2023-12-21 17:27:18 +0100 |
commit | d5175b4fb930f1ca48e514a4ab8080f050d4c6bc (patch) | |
tree | de2050743f064b2741e86e5aafd76d3979be4354 /roles | |
parent | 8db698df4c9146f6c16e93cefe96e040b2833561 (diff) | |
download | rules-d5175b4fb930f1ca48e514a4ab8080f050d4c6bc.tar.gz |
feat(roles/update): add system update role
Diffstat (limited to 'roles')
-rw-r--r-- | roles/update/tasks/main.yml | 16 |
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 |