The Python 2 yum module is needed for this module. If you require Python 3
support use the `dnf` Ansible module instead.

You need to install yum bindings for Python2 or dnf bindings for Python3 on
the remote machine.



On Mon, Jul 24, 2023 at 12:11 PM Saillesh Satam <[email protected]>
wrote:

> 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
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/9108c006-ae4e-4e0b-948b-98fcd1d47436n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/9108c006-ae4e-4e0b-948b-98fcd1d47436n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Thanks,
Abhijeet Kasurde

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFwWkHqh-B6Gdat2j%2BjZ2e%3D0pyLQpx%3DB%2Ba-LQBaq7MNc9bGHBw%40mail.gmail.com.

Reply via email to