community / community.general / 8.5.0 / 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 (8.5.0) — module
Install with ansible-galaxy collection install community.general:==8.5.0
collections: - name: community.general version: 8.5.0
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 Apache / httpd version 2.4.57-2 from being updated community.general.yum_versionlock: state: present name: - httpd-0:2.4.57-2.el9
- 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 name: httpd
name: description: - Package name or a list of package names with optional version or wildcards. - Specifying versions is supported since community.general 7.2.0. elements: str required: true type: list state: choices: - absent - present default: present description: - If state is V(present), package(s) will be added to yum versionlock list. - If state is V(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