community.general.sysupgrade module – Manage OpenBSD system upgrades
Note
This module is part of the community.general collection (version 10.7.5).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.general.
To use it in a playbook, specify: community.general.sysupgrade.
New in community.general 1.1.0
Synopsis
- Manage OpenBSD system upgrades using - sysupgrade.
Parameters
| Parameter | Comments | 
|---|---|
| Fetch and verify files and create  Set to  Choices: 
 | |
| Force upgrade (for snapshots only). Choices: 
 | |
| OpenBSD mirror top-level URL for fetching an upgrade. By default, the mirror URL is pulled from  | |
| Keep the files under  By default, the files will be deleted after the upgrade. Choices: 
 | |
| Apply the latest snapshot. Otherwise release will be applied. Choices: 
 | 
Attributes
| Attribute | Support | Description | 
|---|---|---|
| Support: none | Can run in  | |
| Support: none | Will return details on what has changed (or possibly needs changing in  | 
Examples
- name: Upgrade to latest release
  community.general.sysupgrade:
  register: sysupgrade
- name: Upgrade to latest snapshot
  community.general.sysupgrade:
    snapshot: true
    installurl: https://cloudflare.cdn.openbsd.org/pub/OpenBSD
  register: sysupgrade
- name: Reboot to apply upgrade if needed
  ansible.builtin.reboot:
  when: sysupgrade.changed
# Note: Ansible will error when running this way due to how
#   the reboot is forcefully handled by sysupgrade:
- name: Have sysupgrade automatically reboot
  community.general.sysupgrade:
    fetch_only: false
  ignore_errors: true
