From 9be93d6ac7d7a24362b6a32ef4063fa4c4f3e4a1 Mon Sep 17 00:00:00 2001 From: Arturas Slajus Date: Tue, 25 Jun 2013 10:45:01 +0300 Subject: [PATCH] Better error for fireball + sudo mode. --- lib/ansible/runner/connection_plugins/fireball.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ansible/runner/connection_plugins/fireball.py b/lib/ansible/runner/connection_plugins/fireball.py index 2f8531239bc..cd137f0606e 100644 --- a/lib/ansible/runner/connection_plugins/fireball.py +++ b/lib/ansible/runner/connection_plugins/fireball.py @@ -73,7 +73,11 @@ class Connection(object): vvv("EXEC COMMAND %s" % cmd) if self.runner.sudo and sudoable: - raise errors.AnsibleError("fireball does not use sudo, but runs as whoever it was initiated as. (That itself is where to use sudo).") + raise errors.AnsibleError( + "When using fireball you should not use sudo to run your tasks. " + + "Instead please run fireball action with sudo and use 'sudo: no' " + + "for the tasks that go via fireball." + ) data = dict( mode='command',