From 16108e4a9909cb4a15157c9ee7a5335ce1deb227 Mon Sep 17 00:00:00 2001 From: Bruno BAILLUET Date: Sat, 6 Sep 2014 16:41:16 +0200 Subject: [PATCH] Adding a new 'load_callback_plugins' config option, defaults to False This option, when set to True, allows "ansible" command to load callback plugins --- bin/ansible | 2 ++ lib/ansible/constants.py | 1 + 2 files changed, 3 insertions(+) diff --git a/bin/ansible b/bin/ansible index f236c832698..792b259144a 100755 --- a/bin/ansible +++ b/bin/ansible @@ -38,6 +38,8 @@ class Cli(object): def __init__(self): self.stats = callbacks.AggregateStats() self.callbacks = callbacks.CliRunnerCallbacks() + if C.DEFAULT_LOAD_CALLBACK_PLUGINS: + callbacks.load_callback_plugins() # ---------------------------------------------- diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py index 117f688853d..6746ba288e2 100644 --- a/lib/ansible/constants.py +++ b/lib/ansible/constants.py @@ -175,6 +175,7 @@ SYSTEM_WARNINGS = get_config(p, DEFAULTS, 'system_warnings', 'ANS DEPRECATION_WARNINGS = get_config(p, DEFAULTS, 'deprecation_warnings', 'ANSIBLE_DEPRECATION_WARNINGS', True, boolean=True) DEFAULT_CALLABLE_WHITELIST = get_config(p, DEFAULTS, 'callable_whitelist', 'ANSIBLE_CALLABLE_WHITELIST', [], islist=True) COMMAND_WARNINGS = get_config(p, DEFAULTS, 'command_warnings', 'ANSIBLE_COMMAND_WARNINGS', False, boolean=True) +DEFAULT_LOAD_CALLBACK_PLUGINS = get_config(p, DEFAULTS, 'load_callback_plugins', 'ANSIBLE_LOAD_CALLBACK_PLUGINS', False, boolean=True) # CONNECTION RELATED ANSIBLE_SSH_ARGS = get_config(p, 'ssh_connection', 'ssh_args', 'ANSIBLE_SSH_ARGS', None)