Skip to content

Ansible 2.8 error #46

@naxhh

Description

@naxhh

hi! when testing the callback against ansible 2.8 I face this error

Traceback (most recent call last):
  File "/usr/local/bin/ansible-playbook", line 110, in <module>
    exit_code = cli.run()
  File "/usr/local/lib/python2.7/site-packages/ansible/cli/playbook.py", line 123, in run
    results = pbex.run()
  File "/usr/local/lib/python2.7/site-packages/ansible/executor/playbook_executor.py", line 100, in run
    self._tqm.load_callbacks()
  File "/usr/local/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py", line 162, in load_callbacks
    callback_obj = callback_plugin()
  File "/Users/ignacio.tolstoy/code/devops-mt--ansible/callback_plugins/datadog_callback.py", line 40, in __init__
    self._options = cli.options
AttributeError: 'PlaybookCLI' object has no attribute 'options'

Not related, what is the standard way to run the callback only when a env var is present?
For example, we have 3-4 playbooks but only want to run the callback in one of them.
Since all of them share the config they run the callback by default

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions