在 2019年1月28日星期一 UTC+8下午4:10:51,[email protected]写道: > > From what I saw in my environment I got this error when the script wasn't > in my root directory. > > [root@xxx API]# ./my_ansible.py Traceback (most recent call last): > File "./my_ansible.py", line 5, in <module> > from ansible.parsing.dataloader import DataLoader > File "/home/xxx/projects/API/ansible.py", line 5, in > <module>ImportError: No module named parsing.dataloader > > Once I moved it to /root - it ran fine: > > [root@xxx ~]# ./my_ansible.py[root@xxx ~]# > > ansible 2.7.5 config file = /etc/ansible/ansible.cfg configured module search path = ['/Users/shenhaowei/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python3.7/site-packages/ansible executable location = /usr/local/bin/ansible python version = 3.7.0 (default, Jun 29 2018, 20:13:13) [Clang 9.1.0 (clang-902.0.39.2)]
-- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/aaab02b8-0c02-4d6c-856b-2006a624b112%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
