[ansible-project] jenkins ansible template

2018-01-16 Thread Sudhir Kumar
Hi, i am trying to add multiple sudoers line with template. so, i am passing sudoers=abc,def within jenkins and use -e (extended vars) while running playbook in template: {% for item in sudoers %} {{ item }} ALL=(ALL) NOPASSWD:ALL {% endfor %} yml files looks like : - name: sudoers file

Re: [ansible-project] jenkins ansible template

2018-01-16 Thread Sudhir Kumar
plit(',') }}" > > kind regards > Pshem > > > On Wed, 17 Jan 2018 at 12:00 Sudhir Kumar > wrote: > >> Hi, >> >> i am trying to add multiple sudoers line with template. >> >> so, i am passing sudoers=abc,def within jenkins an

Re: [ansible-project] jenkins ansible template

2018-01-16 Thread Sudhir Kumar
way is to > drop the with_items and use the one inside the template: > > {% for item in sudoers.split(',' %} > > > kind regards > Pshem > > > On Wed, 17 Jan 2018 at 12:32 Sudhir Kumar > wrote: > >> Thanks Pshem but i am still getting same resul

[ansible-project] ansible conditions

2018-02-01 Thread Sudhir Kumar
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: /tm

[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

Re: [ansible-project] Re: ansible conditions

2018-02-02 Thread Sudhir Kumar
UTC+1, Kai Stian Olstad wrote: > > 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 yo

Re: [ansible-project] Re: ansible conditions

2018-02-03 Thread Sudhir Kumar
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. So error is : from script i

[ansible-project] Re: ansible conditions

2018-02-04 Thread Sudhir Kumar
> > 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: >> >&g

[ansible-project] with_items and when

2017-10-25 Thread Sudhir Kumar
Hi, Basically would like to check if file is present on remote system or not. If not present, then create one, otherwise skip this step. - name: Checking if files already present stat: path: "{{ item }}" register: file_path with_items: - /var/abc.key -

Re: [ansible-project] with_items and when

2017-10-26 Thread Sudhir Kumar
Thanks Brian.. On Wednesday, October 25, 2017 at 3:33:18 PM UTC+2, Brian Coca wrote: > > - copy: content=' ' dest={{item}} force=no > with_items: > - /var/abc.key > ... > > > -- > -- > Brian Coca > -- You received this message because you are subscribed to the Google

[ansible-project] ansible awx

2017-10-29 Thread Sudhir Kumar
Hi, Is there any way to configure Ansible AWX dashboard settings so it can pick up all our job, templates and hostnames by mentioning hostname and file locations ? Example: Ansible is working as expected and able to push files but i would like to show that in dashboard. My awx configured on