From e98153d26d5e37921878fadd7e7d7422f398f7cb Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Sat, 6 Oct 2012 15:25:37 -0400 Subject: [PATCH] cowsay for BSD! Signed-off-by: Brian Coca --- lib/ansible/callbacks.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/ansible/callbacks.py b/lib/ansible/callbacks.py index 0ac6961435..9b45980b53 100644 --- a/lib/ansible/callbacks.py +++ b/lib/ansible/callbacks.py @@ -28,15 +28,16 @@ callbacks = utils.import_plugins(os.path.join(dirname, 'callback_plugins')) callbacks = [ c.CallbackModule() for c in callbacks.values() ] cowsay = None -if os.path.exists("/usr/bin/cowsay"): - cowsay = "/usr/bin/cowsay" -elif os.path.exists("/usr/games/cowsay"): - cowsay = "/usr/games/cowsay" if os.getenv("ANSIBLE_NOCOWS") is not None: cowsay = None +elif os.path.exists("/usr/games/cowsay"): + cowsay = "/usr/games/cowsay" +elif os.path.exists("/usr/local/bin/cowsay"): + # BSD path for cowsay + cowsay = "/usr/local/bin/cowsay" def call_callback_module(method_name, *args, **kwargs): - + for callback_plugin in callbacks: methods = [ getattr(callback_plugin, method_name, None),