I am getting below error
FAILED! => {"changed": false, "msg": "The Python 2 yum module is needed for this module. If you require Python 3 support use the `dnf` Ansible module instead."}
Please help
---
- hosts: all
become: true
vars:
ansible_become_pass:
tasks:
- name: install ntp
yum:
name: ntp
state: present
notify:
run update
- name: install vim
yum:
name: vim
state: present
- name: start ntp service
service:
name: ntp
state: started
enabled: true
handlers:
- name: run update
yum:
update_cache: yes