diff --git a/tasks/main.yml b/tasks/main.yml index cb49895..4821b4b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,11 +3,11 @@ ansible.builtin.package_facts: manager: auto -- name: Remove package locks +- name: Disable package locks when: heartbeat_package_hold block: - - name: Remove yum package lock + - name: Disable yum package lock when: ansible_os_family == 'RedHat' block: @@ -15,19 +15,20 @@ ansible.builtin.package: name: yum-plugin-versionlock - - name: Configure yum versionlock + - name: Disable yum package lock community.general.yum_versionlock: name: "{{ item }}" state: absent loop: "{{ [heartbeat_package_names] | flatten }}" + changed_when: false when: item in packages - tags: skip_ansible_lint - name: Disable apt package lock ansible.builtin.dpkg_selections: name: "{{ item }}" selection: install loop: "{{ [heartbeat_package_names] | flatten }}" + changed_when: false when: - item in packages - ansible_os_family == 'Debian' @@ -41,7 +42,7 @@ when: heartbeat_package_state in ['present', 'latest'] block: - - name: Enable package holds + - name: Enable package locks when: heartbeat_package_hold block: @@ -50,6 +51,7 @@ name: "{{ item }}" selection: hold loop: "{{ [heartbeat_package_names] | flatten }}" + changed_when: false when: (ansible_os_family | lower) == 'debian' - name: Enable yum package lock @@ -57,8 +59,8 @@ name: "{{ item }}" state: present loop: "{{ [heartbeat_package_names] | flatten }}" + changed_when: false when: ansible_os_family == 'RedHat' - tags: skip_ansible_lint - name: Configure heartbeat ansible.builtin.copy: