Are you connecting to a Cisco network device? If so this commend will fail, as the you need to you a different method of connecting an execution since Cisco switches don't support python.
On Thursday, January 20, 2022 at 12:54:17 PM UTC-6 [email protected] wrote: > The quoting was to make it clear what should be typed at the command line. > So you should not type quotes. Just type > > > ansible --version > > > > > > On Wed, 19 Jan 2022 at 16:40, Kevin Y <[email protected]> wrote: > >> Hi Dick, Thanks for your reply. I tried it with different quotes. all of >> them cannot work. >> any other suggestions? >> >> >> On Wednesday, January 19, 2022 at 5:51:58 AM UTC-5 [email protected] >> wrote: >> >>> looks like your installation is messed up. >>> What does 'ansible --version' say? >>> >>> On Wed, 19 Jan 2022 at 05:40, Kevin Y <[email protected]> wrote: >>> >>>> Hi I am a little new to ansible. Anyone can take a look at the below >>>> why the command cannot go through? Thank you! >>>> >>>> >>>> admin1@Len:~$ *ansible lab-hosts -m raw -a "show run" -u admin -k | >>>> grep* 'hostname\| system mtu' >>>> Traceback (most recent call last): >>>> File "/usr/bin/ansible", line 34, in <module> >>>> from ansible import context >>>> File "/usr/local/lib/python3.8/dist-packages/ansible/context.py", >>>> line 18, in <module> >>>> from ansible.module_utils.common._collections_compat import >>>> Mapping, Set >>>> ModuleNotFoundError: No module named 'ansible.module_utils' >>>> >>>> -- >>>> >>> 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/c3cebbc6-937c-46d7-b316-d950f7d9cb9dn%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/ansible-project/c3cebbc6-937c-46d7-b316-d950f7d9cb9dn%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> >>> >>> -- >>> Dick Visser >>> Trust & Identity Service Operations Manager >>> GÉANT >>> >> -- >> 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/1536f3bf-dffb-4f62-b442-1eb0dbdf27e5n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/1536f3bf-dffb-4f62-b442-1eb0dbdf27e5n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > Sent from a mobile device - please excuse the brevity, spelling and > punctuation. > -- 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/ab8b9193-1e0f-4c13-ae95-fb2130bba818n%40googlegroups.com.
