Closed EmptyByte closed 4 hours ago
The following task works only on RHEL8, gets skipped on RHEL9
- name: Disable PostgreSQL module become: true ansible.builtin.copy: dest: /etc/dnf/modules.d/postgresql.module owner: root group: root mode: 0644 content: | [postgresql] name=postgresql stream= profiles= state=disabled when: - ansible_os_family == 'RedHat' - ansible_distribution_major_version | int == 8
Should be: Alternatively skip the major check and target only if pkg_mgr | lower == 'dnf' :
- name: Disable PostgreSQL module become: true ansible.builtin.copy: dest: /etc/dnf/modules.d/postgresql.module owner: root group: root mode: 0644 content: | [postgresql] name=postgresql stream= profiles= state=disabled when: ansible_facts['distribution_major_version'] | int in [8, 9]
@EmptyByte Thanks for raising this issue , Would you mind raising this as a Pull Request, Happy to take this in upcoming releases :)
The following task works only on RHEL8, gets skipped on RHEL9
Should be: Alternatively skip the major check and target only if pkg_mgr | lower == 'dnf' :