Re: [ansible-project] unable to connect to jenkins

2023-07-02 Thread Narmada Karthika
If the job already exist "item.jobs": [ { "fullname": "repo2", "jobs": [], "name": "repo2", "url": " https://url2/job/repo2/ " } On Sunday, July 2, 2023 at 5:36:32 PM UTC-7 Narmada Karthika wrote: > I am having hard time getting the when

Re: [ansible-project] unable to connect to jenkins

2023-07-02 Thread Narmada Karthika
I am having hard time getting the when condition work I have couple of application names have 2 separate jenkins urls. My playbook has to check if the job exists on both the urls and then create the new job. I am successful until checking and getting the data if the job exists or not. NOw when t

Re: [ansible-project] unable to connect to jenkins

2023-07-01 Thread Narmada Karthika
Abhijeet, I need one more help, from the above playbook I am trying to check if the job exists on 2 jenkins urls. Now, I am trying to configure job if the doesn't exist on any of the jenkins, for this I have to look for job if exists. I am little confused how to check the condition. On Friday,

Re: [ansible-project] unable to connect to jenkins

2023-06-30 Thread Narmada Karthika
Thanks bunch, I used this for token: "{{ (lookup('file', url_item.password_file )|from_yaml).password }}" it worked.. On Friday, June 30, 2023 at 4:09:42 PM UTC-7 Narmada Karthika wrote: > > any suggestions how I can use the password from this debug as variable in > next play > - debug: >

Re: [ansible-project] unable to connect to jenkins

2023-06-30 Thread Abhijeet Kasurde
Hi Narmada, I just showed you an example. You can directly use `jekins_job_info` in a similar way. On Fri, Jun 30, 2023 at 4:09 PM Narmada Karthika wrote: > > any suggestions how I can use the password from this debug as variable in > next play > - debug: > msg: "{{ (lookup('file', url_

Re: [ansible-project] unable to connect to jenkins

2023-06-30 Thread Narmada Karthika
any suggestions how I can use the password from this debug as variable in next play - debug: msg: "{{ (lookup('file', url_item.password_file )|from_yaml).password }}" On Friday, June 30, 2023 at 12:48:32 PM UTC-7 Narmada Karthika wrote: > Also I would I use that password item in the bel

Re: [ansible-project] unable to connect to jenkins

2023-06-30 Thread Narmada Karthika
Also I would I use that password item in the below play On Fri, Jun 30, 2023 at 12:16 PM Abhijeet Kasurde wrote: > Hi Narmada, > > I would suggest you to remove include_vars if you want to read the > variables from files. Instead of that you can simplify the task like - > > ``` > vars: > u

Re: [ansible-project] unable to connect to jenkins

2023-06-30 Thread Narmada Karthika
That’s right, that how my password file looks like Let me try your suggestion and update you. Thankyou On Fri, Jun 30, 2023 at 12:16 PM Abhijeet Kasurde wrote: > Hi Narmada, > > I would suggest you to remove include_vars if you want to read the > variables from files. Instead of that you can sim

Re: [ansible-project] unable to connect to jenkins

2023-06-30 Thread Abhijeet Kasurde
Hi Narmada, I would suggest you to remove include_vars if you want to read the variables from files. Instead of that you can simplify the task like - ``` vars: urls: - url: url1 username: username1 password_file: group_vars/password1.yml - url: url2 usern

Re: [ansible-project] unable to connect to jenkins

2023-06-30 Thread Narmada Karthika
thankyou, I have some typos, fixed that issue. BUt in the same playbook I trying to use loops and access both the urls with respective user and password and print the job info, but only one url response is working. other one is failing with error. if I remove the working url and try with access

Re: [ansible-project] unable to connect to jenkins

2023-06-30 Thread Dick Visser
On Fri, 30 Jun 2023 at 09:22, Narmada Karthika wrote: > msg": "Unable to connect to Jenkins server, Unable to authenticate with any > scheme:\nauth(kerberos) HTTPSConnectionPool(host='.*', > port=443): Max retries exceeded with url: /api/json (Caused by > NewConnectionError(' 0x7f4fcb26bd30>:

[ansible-project] unable to connect to jenkins

2023-06-30 Thread Narmada Karthika
I am getting below error when trying to connect to jenkins url using ansible_jenkins_info module msg": "Unable to connect to Jenkins server, Unable to authenticate with any scheme:\nauth(kerberos) HTTPSConnectionPool(host='.*', port=443): Max retries exceeded with url: /api/json (Caused by Ne