Unexpected Exception: name 'basestring' is not defined when invoking ansible2

后端 未结 5 757
逝去的感伤
逝去的感伤 2020-12-28 11:37

I\'m trying to execute ansible2 commnads...

When I do:

ansible-playbook -vvv -i my/inventory my/playbook.yml

I get:

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-28 12:26

    I ran into this issue using Python 3 with Ansible and solved by forking the dopy project and installing dopy in my ansible script with:

    name: git+https://github.com/eodgooch/dopy@0.4.0#egg=dopy.

    If you are still getting errors be sure to change the version to 0.4.0 and remove any lingering dopy packages from your Python site-packages directory.

    Also you could pip3 install git+https://github.com/eodgooch/dopy@0.4.0#egg=dopy instead of in your Ansible Task.

提交回复
热议问题