Skip to content

Commit

Permalink
PMM-12998 Log message on ansible self update.
Browse files Browse the repository at this point in the history
  • Loading branch information
talhabinrizwan committed Apr 4, 2024
1 parent 75c0ed9 commit 0765e30
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions update/ansible/playbook/tasks/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,20 @@
- vmproxy
- grafana-db-migrator
pre_tasks:
- name: Check for updates of ansible-core package
- name: Check for updates of ansible-core package | EL9
shell: yum list updates ansible-core | grep -q 'ansible-core' && echo 'Available' || echo 'Not Available'
register: ansible_core_update
when:
- ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
- ansible_distribution_major_version == '9'

- name: Log message if ansible-core package needs update
- name: Log message if ansible-core package needs update | EL9
debug:
msg: "The ansible-core package needs update. Playbook will re-run to apply the changes."
when: ansible_core_update.stdout == "Available"
when:
- ansible_distribution == 'OracleLinux' or ansible_distribution == 'AlmaLinux'
- ansible_distribution_major_version == '9'
- ansible_core_update.stdout == "Available"

- name: Remove ansible RPM if installed | EL9
when:
Expand Down

0 comments on commit 0765e30

Please sign in to comment.