Re: [ansible-project] Re: ansible conditions

2018-02-05 Thread Sidh
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:

Re: [ansible-project] Re: ansible conditions

2018-02-04 Thread eshan TANDON
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 wrote: > Hi All, > > Seems like some miscommunication here. I provided code in my first comment

[ansible-project] Re: ansible conditions

2018-02-04 Thread Sudhir Kumar
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 +

[ansible-project] Re: ansible conditions

2018-02-04 Thread Varun Chopra
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.

Re: [ansible-project] Re: ansible conditions

2018-02-03 Thread Sudhir Kumar
Can you please give me an example for that or refer documentation on how can i do this : "when' in ansible ? On Saturday, February 3, 2018 at 7:31:50 PM UTC+1, rhys.jame...@googlemail.com wrote: > > Is it possible the varibale is defined but unset. Why not test that the > length of string is >

Re: [ansible-project] Re: ansible conditions

2018-02-03 Thread rhys.james.campbell via Ansible Project
Is it possible the varibale is defined but unset. Why not test that the length of string is > 0 instead? On Saturday, February 3, 2018 at 2:18:52 AM UTC+1, Sudhir Kumar wrote: > > > when: is not working as expected, So, even if i don't pass parameters then > also it tries to run and then fails.

Re: [ansible-project] Re: ansible conditions

2018-02-02 Thread Sudhir Kumar
when: is not working as expected, So, even if i don't pass parameters then also it tries to run and then fails. So error is : from script i.e. parameters not passed. But ideally, it should skip this if parameter is not supplied. Regards, Sidh On Friday, February 2, 2018 at 2:35:22 PM

Re: [ansible-project] Re: ansible conditions

2018-02-02 Thread Kai Stian Olstad
On Friday, 2 February 2018 12.56.23 CET Sudhir Kumar wrote: > Hi All, > > Any ideas ? Not without the actual error message you get. -- Kai Stian Olstad -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and

[ansible-project] Re: ansible conditions

2018-02-02 Thread Sudhir Kumar
Hi All, Any ideas ? Sidh On Thursday, February 1, 2018 at 4:41:08 PM UTC+1, 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

[ansible-project] Re: Ansible conditions and logics

2014-04-02 Thread Marcin Prączko
Hi, I think that you have to find best way which works for you. For example I have to setup quite a lot munin symlinks for checks which depends of server role. 1. Running this via ansible was really slow and caused quite complicated solution in terms of map links to roles. 2. So I decided