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].
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/706a2822-ca39-4a02-a397-941819bc819f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to