community / community.general / 8.5.0 / module / sysupgrade Manage OpenBSD system upgrades | "added in version" 1.1.0 of community.general" Authors: Andrew Klaus (@precurse)community.general.sysupgrade (8.5.0) — module
Install with ansible-galaxy collection install community.general:==8.5.0
collections: - name: community.general version: 8.5.0
Manage OpenBSD system upgrades using sysupgrade.
- 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
force: default: false description: - Force upgrade (for snapshots only). type: bool snapshot: default: false description: - Apply the latest snapshot. - Otherwise release will be applied. type: bool fetch_only: default: true description: - Fetch and verify files and create /bsd.upgrade but do not reboot. - Set to V(false) if you want sysupgrade to reboot. This will cause Ansible to error, as it expects the module to exit gracefully. See the examples. type: bool installurl: description: - OpenBSD mirror top-level URL for fetching an upgrade. - By default, the mirror URL is pulled from /etc/installurl. type: str keep_files: default: false description: - Keep the files under /home/_sysupgrade. - By default, the files will be deleted after the upgrade. type: bool
rc: description: The command return code (0 means success). returned: always type: int stderr: description: Sysupgrade standard error. returned: always sample: 'sysupgrade: need root privileges' type: str stdout: description: Sysupgrade standard output. returned: always type: str