We are getting below errors if using the except module in the ansible playbooks.
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: No module named ptyprocess fatal: [sejenk01]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (pexpect) on sejenk01's Python /usr/bin/python. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}
ansible
ANSIBLE VERSIONansible 2.9.10
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/Users/prathapdasari/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /Library/Python/2.7/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.16 (default, Jun 5 2020, 22:59:21) [GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.29.20) (-macos10.15-objc-
PrathapDasaris-MacBook-Pro:ansible-wdt prathapdasari$
python --version
Python 2.7.5
Linux sefmw01 4.1.12-124.39.5.1.el7uek.x86_64 #2 SMP Tue Jun 9 20:03:37 PDT 2020 x86_64 x86_64 x86_64 GNU/Linux
EXPECTED RESULTSit should be completed on remote servers without any errors.
--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwMUcDrmUQ1Nd_HnXRP%2B1Mw5R5U7ULDPteUmt02HCLmv3g%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CANCC9rJqxt%3DmwXD3Y_sbHy7m-LcJd3DhJORh7w0jyz3QB-g69g%40mail.gmail.com.
mv pexpect-4.2.1.tar.gz /usr/local/src/
cd /usr/local/src
tar zxvf pexpect-4.2.1.tar.gz
cd pexpect-4.2.1
python setup.py install
Regards,PrathapTo view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwPJatauz%2B_9XB0SxTcYEnfWJcnT7gMu6_a7RPYb8ZUtvw%40mail.gmail.com.