community.general.syspatch (2.5.9) — module

Manage OpenBSD system patches

Authors: Andrew Klaus (@precurse)

Install collection

Install with ansible-galaxy collection install community.general:==2.5.9


Add to requirements.yml

  collections:
    - name: community.general
      version: 2.5.9

Description

Manage OpenBSD system patches using syspatch.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Apply all available system patches
  community.general.syspatch:
    apply: true
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Revert last patch
  community.general.syspatch:
    revert: one
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Revert all patches
  community.general.syspatch:
    revert: all
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# NOTE: You can reboot automatically if a patch requires it:
- name: Apply all patches and store result
  community.general.syspatch:
    apply: true
  register: syspatch
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Reboot if patch requires it
  ansible.builtin.reboot:
  when: syspatch.reboot_needed

Inputs

    
apply:
    default: true
    description:
    - Apply all available system patches.
    - By default, apply all patches.
    - Deprecated. Will be removed in community.general 3.0.0.
    type: bool

revert:
    choices:
    - all
    - one
    description:
    - Revert system patches.
    type: str

Outputs

rc:
  description: The command return code (0 means success)
  returned: always
  type: int
reboot_needed:
  description: Whether or not a reboot is required after an update.
  returned: always
  sample: true
  type: bool
stderr:
  description: syspatch standard error.
  returned: always
  sample: 'syspatch: need root privileges'
  type: str
stdout:
  description: syspatch standard output.
  returned: always
  sample: 001_rip6cksum
  type: str