community / community.general / 3.8.10 / module / yum_versionlock Locks / unlocks a installed package(s) from being updated by yum package manager | "added in version" 2.0.0 of community.general" Authors: Florian Paul Azim Hoberg (@gyptazy), Amin Vakil (@aminvakil)community.general.yum_versionlock (3.8.10) — module
Install with ansible-galaxy collection install community.general:==3.8.10
collections: - name: community.general version: 3.8.10
This module adds installed packages to yum versionlock to prevent the package(s) from being updated.
- name: Prevent Apache / httpd from being updated community.general.yum_versionlock: state: present name: httpd
- name: Prevent multiple packages from being updated community.general.yum_versionlock: state: present name: - httpd - nginx - haproxy - curl
- name: Remove lock from Apache / httpd to be updated again community.general.yum_versionlock: state: absent package: httpd
name: description: - Package name or a list of package names with optional wildcards. elements: str required: true type: list state: choices: - absent - present default: present description: - If state is C(present), package(s) will be added to yum versionlock list. - If state is C(absent), package(s) will be removed from yum versionlock list. type: str
packages: description: A list of package(s) in versionlock list. elements: str returned: success sample: - httpd type: list state: description: State of package(s). returned: success sample: present type: str