how to implement '-m pip' in ansible?

Viewed 57

I am trying to upgrade pip using ansible on RockyLinux 8.5, you can refer below code snippet which I used in my yml file.

- name: Upgrade pip
pip:
caution: could change to /bin/pip3 without "-"
executable: "/bin/pip-3"
umask: "0022"
name: "pip"
state: "forcereinstall"
environment:
http_proxy: "{{ proxy }}"
https_proxy: "{{ proxy }}"
become: true

while running it's showing an error and suggests to implement Python with '-m pip' instead of running pip

What exact changes require in my code snippet ?

0 Answers
Related