Hello there!
I am newbie on ansible, and have problem with in one of the tasks.
I was creating a virtual machine, and when playbook get to the point
“Check whether AD group exist” stopped with error
" {“msg”: “winrm or requests is not installed: No module named ‘winrm’”"
Task include the module “community.windows.win_domain_object_info”
and delegate_to “proxy server” where this proxy server connected to server AD and check AD Group.
I tried install this package
$ pip install pywinrm
But, have answer
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pywinrm in /usr/local/lib/python3.8/site-packages (0.4.3)
Requirement already satisfied: xmltodict in /usr/local/lib/python3.8/site-packages (from pywinrm) (0.13.0)
Requirement already satisfied: requests>=2.9.1 in /usr/local/lib/python3.8/site-packages (from pywinrm) (2.28.1)
Requirement already satisfied: requests-ntlm>=1.1.0 in /usr/local/lib/python3.8/site-packages (from pywinrm) (1.1.0)
Requirement already satisfied: six in /usr/lib/python3.8/site-packages (from pywinrm) (1.16.0)
Requirement already satisfied: charset-normalizer<3,>=2 in /usr/local/lib/python3.8/site-packages (from requests>=2.9.1->pywinrm) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.8/site-packages (from requests>=2.9.1->pywinrm) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.8/site-packages (from requests>=2.9.1->pywinrm) (1.26.12)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/site-packages (from requests>=2.9.1->pywinrm) (2022.9.24)
Requirement already satisfied: ntlm-auth>=1.0.2 in /usr/local/lib/python3.8/site-packages (from requests-ntlm>=1.1.0->pywinrm) (1.5.0)
Requirement already satisfied: cryptography>=1.3 in /usr/lib64/python3.8/site-packages (from requests-ntlm>=1.1.0->pywinrm) (3.1.1)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in /usr/lib64/python3.8/site-packages (from cryptography>=1.3->requests-ntlm>=1.1.0->pywinrm) (1.15.0)
Requirement already satisfied: pycparser in /usr/lib/python3.8/site-packages (from cffi!=1.11.3,>=1.8->cryptography>=1.3->requests-ntlm>=1.1.0->pywinrm) (2.20)
The interesting thing is that my coworkers and I log into the ansible server under AD accounts, then do “sudo su” and work and build under root. And I’m the only one with this problem
Any answers would be helpful.
Thanks you!