community.general.sysupgrade – Manage OpenBSD system upgrades
community.general.sysupgrade – Manage OpenBSD system upgrades
Note
This plugin is part of the community.general collection (version 2.0.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.sysupgrade
.
New in version 1.1.0: of community.general
Synopsis
- Manage OpenBSD system upgrades using sysupgrade.
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
fetch_only boolean |
|
Fetch and verify files and create /bsd.upgrade but do not reboot. Set to |
force boolean |
|
Force upgrade (for snapshots only). |
installurl string |
OpenBSD mirror top-level URL for fetching an upgrade. By default, the mirror URL is pulled from /etc/installurl. | |
keep_files boolean |
|
Keep the files under /home/_sysupgrade. By default, the files will be deleted after the upgrade. |
snapshot boolean |
|
Apply the latest snapshot. Otherwise release will be applied. |
Examples
- name: Upgrade to latest release
community.general.sysupgrade:
register: sysupgrade
- name: Upgrade to latest snapshot
community.general.sysupgrade:
snapshot: yes
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: no
ignore_errors: yes
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
rc integer |
always |
The command return code (0 means success).
|
stderr string |
always |
Sysupgrade standard error.
Sample: sysupgrade: need root privileges |
stdout string |
always |
Sysupgrade standard output.
|
Authors
- Andrew Klaus (@precurse)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/sysupgrade_module.html