Always worth looking at the stat module for checking out paths too Mark...
- name: Check for prior download
stat: path={{ vmwtools_tmp }}/{{ vmwtools_tar}}
register: tar
- name: Fetch tools install
get_url:
url={{ vmwtools_url }}/{{ vmwtools_tar }}
dest={{ vmwtools_tmp }}
when: not tar.stat.exists
On Tuesday, 10 February 2015 13:20:03 UTC, Mark van der Hout wrote:
>
> 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]>
>> 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/e9ad3e9e-5622-4161-88bc-1bf9797660e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.