Thanks Mike!
I downgraded to 1.9.4 and it worked well.
On Friday, February 12, 2016 at 12:15:20 PM UTC-5, Mike Biancaniello wrote:
>
> ansible.callbacks no longer exists in 2.0.
>
> it sounds like you are calling Ansible from a python script. If so, this
> process is very different in 2.0.
> You probably need to reach out to whomever wrote the software or downgrade
> your ansible to 1.9.
>
> If you want to take a stab at fixing it, the way I've solved this for my
> scripts is:
>
> from ansible import __version__ as ANSIBLE_VERSION
> if ANSIBLE_VERSION.startswith('2'):
> from ansible.cli.playbook import PlaybookCLI
> else:
> from ansible.playbook import PlayBook
> from ansible.inventory import Inventory
> from ansible.callbacks import PlaybookCallbacks, AggregateStats,
> PlaybookRunnerCallbacks
>
> def run_playbook():
> if ANSIBLE_VERSION.startswith('2'):
> return _run_playbook_v20()
> else:
> return _run_playbook_v19()
>
> def _run_playbook_v20():
> cli = PlaybookCLI()
> cli.parse()
> return cli.run()
>
> def _run_playbook_v19(cliargs):
> class playbook_cb(PlaybookCallbacks):
> ... etc ...
>
>
>
--
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/fbbb4805-6183-490f-8843-8d60ce950652%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.