Skip to content

Commit

Permalink
PMM-9769 Use ansible-core instead of ansible package.
Browse files Browse the repository at this point in the history
  • Loading branch information
talhabinrizwan committed Sep 13, 2023
1 parent beb40da commit 4da8bbc
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions update/ansible/playbook/tasks/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,23 +264,17 @@
- sshpass
- vi

- name: Check if ansible RPM is installed
command: rpm -q ansible
register: ansible_package_check
ignore_errors: yes # Ignore errors if the package is not installed

- name: Remove ansible RPM if installed | EL9
when:
- ansible_package_check.rc == 0 # Only run when Ansible RPM is installed
- ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
- ansible_distribution_major_version == '9'
yum:
name: ansible
state: absent
ignore_errors: yes

- name: Install ansible-core RPM | EL9
when:
- ansible_package_check.rc == 0 # Only run when Ansible RPM is installed
- ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
- ansible_distribution_major_version == '9'
yum:
Expand Down

0 comments on commit 4da8bbc

Please sign in to comment.