community.general/lib/ansible
Steve Kuznetsov 0bc35354ce Change v2_playbook_on_start logic to positively detect legacy plugins
In order to support legacy plugins, the following two method signatures
are allowed for `CallbackBase.v2_playbook_on_start`:

def v2_playbook_on_start(self):
def v2_playbook_on_start(self, playbook):

Previously, the logic to handle this divergence checked to see if the
callback plugin being called supported an argument named `playbook`
in its `v2_playbook_on_start` method. This was fragile in a few ways:
 - if a plugin author did not use the literal `playbook` to name their
   method argument, their plugin would not be called correctly
 - if a plugin author wrapped their `v2_playbook_on_start` method and
   by doing so changed the argspec to no longer expose an argument
   with that literal name, their plugin would not be called correctly

In order to continue to support both types of callback for backwards
compatibility while making the call more robust for plugin authors,
the logic can be reversed in order to have a positive check for the old
method signature instead of a positive check for the new one.

Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
2016-10-28 10:05:58 -07:00
..
cli Remove extra display statements and add docs (#18229) 2016-10-28 00:38:39 -04:00
compat Move py34 mock_open compat to compat/test/mock (#17157) 2016-08-19 18:11:24 -04:00
config Making the switch to v2 2015-05-03 21:47:26 -05:00
errors Move uses of to_bytes, to_text, to_native to use the module_utils version (#17423) 2016-09-06 22:54:17 -07:00
executor Change v2_playbook_on_start logic to positively detect legacy plugins 2016-10-28 10:05:58 -07:00
galaxy Allow setting alternate_role_name for galaxy CLI (#17418) 2016-10-27 22:34:59 -04:00
inventory Allow unicode inventory filename 2016-10-15 16:54:51 -07:00
module_utils Cleanup StringIO import for module_utils/shell.py 2016-10-28 08:00:57 -07:00
modules bump submodule refs 2016-10-28 09:45:13 -07:00
parsing Fix search path for relative paths in roles (fixes #17877) 2016-10-17 11:21:46 -04:00
playbook Add a new potential su prompt 2016-10-24 16:55:54 -07:00
plugins Fix OpenSSH-related ssh process exit race 2016-10-27 15:47:24 -07:00
template Remove unnecessary warnings (#18121) 2016-10-20 22:49:49 -04:00
utils Docs fragment for common a10 options (#18163) 2016-10-25 16:03:25 +01:00
vars Correct delegated_host_name check 2016-10-11 11:15:53 -07:00
__init__.py Fix ziploader for the cornercase of ansible invoking ansible. 2016-04-29 08:47:49 -07:00
constants.py Make the default Ansible_managed string static so it doesn't interfere with idempotency 2016-10-18 16:19:17 -04:00
release.py Bumping devel version to 2.3.0 2016-10-03 11:46:31 -05:00
test-requirements.txt Making the switch to v2 2015-05-03 21:47:26 -05:00