Thanks, got more info after debugging. 
It's resolved. Idea and when condition was ok. Only issue was that i was 
evaluating wrong parameterized input in this case.

Regards,
Sidh

On Sunday, February 4, 2018 at 9:22:33 PM UTC+1, eshan TANDON wrote:
>
> Hi Sudhir,
> Try logging the actual values:
>
> - debug: var=vg_name verbosity=3
>
> - debug: var=mtpt_size verbosity=3
>
>
> Thanks,
> Eshan
>
>
> On Sun, Feb 4, 2018 at 3:04 PM, Sudhir Kumar <[email protected] 
> <javascript:>> wrote:
>
>> Hi All,
>>
>> Seems like some miscommunication here. I provided code in my first 
>> comment :
>>
>> #############
>>   - name: Executing lvm script 
>>     shell: /tmp/lvm-script.sh sdb {{ vg_name }} {{ mtpt_size }} 
>>     args:
>>       chdir: /tmp/
>>     when: vg_name is defined
>> ##########
>>
>> And using with  jenkins + parameterized input. 
>>
>> So, if any parameterized input present then ansible should fire above 
>> script . If no input is provided then it should not trigger above snippet. 
>>
>> Hope it's clear now.
>>
>> Regards,
>> Sidh
>>
>> On Sunday, February 4, 2018 at 12:20:36 PM UTC+1, Varun Chopra wrote:
>>>
>>> Hi Sudhir,
>>>
>>> You're barely making sense and it doesn't help when you don't provide 
>>> any code.
>>>
>>> Nobody can help you if they don't understand you.
>>>
>>> --
>>> Varun
>>>
>>> On Thursday, February 1, 2018 at 9:11:08 PM UTC+5:30, Sudhir Kumar wrote:
>>>>
>>>> Hi,
>>>>
>>>> Below snippet sometimes working and sometimes failing. So, i am 
>>>> executing it with jenkins and idea is that if parameter is defined then 
>>>> script should run otherwise it should not run. 
>>>>
>>>> Can anyone please enlighten me what's wrong ?
>>>>
>>>> #############
>>>>   - name: Executing lvm script 
>>>>     shell: /tmp/lvm-script.sh sdb {{ vg_name }} {{ mtpt_size }} 
>>>>     args:
>>>>       chdir: /tmp/
>>>>     when: vg_name is defined
>>>> ##########
>>>>
>>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/706a2822-ca39-4a02-a397-941819bc819f%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/706a2822-ca39-4a02-a397-941819bc819f%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Warm Regards,
> Eshan Tandon
>

-- 
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/76e9a08c-b085-4e24-b5ab-264d2319a307%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to