Winrar!
That's just plain stupid of me.
"output.stdout": "/usr/local/tomcat/instances/tcsomething"
now with: failed_when: "'/usr/local/tomcat/' in output.stdout" it works.

Ofcourse it would be better to use the fail module so I can write a custom 
message.

Thanks for pointing out the obvious!


On Tuesday, February 10, 2015 at 2:04:06 PM UTC+1, Matt Martz wrote:
>
> "Hello World" is the default string that the debug module prints of the 
> var it was given is undefined.
>
> The problem is improper use of the debug module.
>
> You aren't giving it either "msg" or "var".
>
> It should look like:
>
> - debug: var=output
>
> On Tuesday, February 10, 2015, Mark van der Hout <[email protected] 
> <javascript:>> wrote:
>
>> Nope :(
>> Doing this:
>> ---
>> - name: Check to see if the tomcat instance already exists
>>   shell: find /usr/local/tomcat/instances -name "{{ 
>> tomcat_instance_name}}"
>>   register: output
>>
>>
>> - name: debug output
>>   debug: output
>>
>>
>> - name: debout output.stdout
>>   debug: output.stdout
>>
>>
>> - name: debug output.stderr
>>   debug: output.stderr
>>
>>
>> - name: debug output.rc
>>   debug: output.rc
>>
>>
>> Results in:
>>
>> TASK: [tomcat7 | Check to see if the tomcat instance already exists] 
>> **********
>> changed: [slave]
>>
>>
>> TASK: [tomcat7 | debug output] 
>> ************************************************
>> ok: [slave] => {
>>     "msg": "Hello world!"
>> }
>>
>>
>> TASK: [tomcat7 | debout output.stdout] 
>> ****************************************
>> ok: [slave] => {
>>     "msg": "Hello world!"
>> }
>>
>>
>> TASK: [tomcat7 | debug output.stderr] 
>> *****************************************
>> ok: [slave] => {
>>     "msg": "Hello world!"
>> }
>>
>>
>> TASK: [tomcat7 | debug output.rc] 
>> *********************************************
>> ok: [slave] => {
>>     "msg": "Hello world!"
>> }
>>
>>
>>
>>
>>
>> On Tuesday, February 10, 2015 at 1:40:54 PM UTC+1, Brian Coca wrote:
>>>
>>> unless you are defining output somewhere else with 'hello world' there 
>>> should be nothing producing this result. 
>>>
>>>
>>>
>>>
>>> -- 
>>> Brian Coca 
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/49d82688-2f50-43f6-a3f7-0746cac9bc5b%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/49d82688-2f50-43f6-a3f7-0746cac9bc5b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
> Matt Martz
> @sivel
> sivel.net
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/62906ad1-224f-4317-9b57-49a54e970e04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to