cannot import name PlayBook in python

7 views
Skip to first unread message

Sagar Mujumale

unread,
Feb 20, 2020, 1:03:15 AM2/20/20
to Ansible Project
I am trying to execute ansible playbook by python script however I am getting below error.

from ansible.playbook import PlayBook
ImportError: cannot import name PlayBook

My script is as below,

from ansible.playbook import PlayBook

pb = PlayBook(playbook='gitlab.yml')
pb.run()


Sagar Mujumale
Cloud Analyst, PaaS Operations
Reply all
Reply to author
Forward
0 new messages