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 trying to write the when condition I am failing.
TASK [Display Jobs] ************************************************************
ok: [localhost] => (item={'changed': False, 'jobs': [], 'invocation': {'module_args': {'glob': 'repo1.*', 'url': '
https://url1.com', 'user': 'account', 'token': 'tokenvalue', 'validate_certs': False, 'name': None, 'color': None, 'password': None}}, 'failed': False, 'item': [{'url': '
https://url1.com', 'username': 'account', 'password_file': 'group_vars/password1.yml'}, 'repo1'], 'ansible_loop_var': 'item'}) => {
"ansible_loop_var": "item",
"item": {
"ansible_loop_var": "item",
"changed": false,
"failed": false,
"invocation": {
"module_args": {
"color": null,
"glob": "repo1.*",
"name": null,
"password": null,
"token": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"url": "url",
"user": "acount",
"validate_certs": false
}
},
"item": [
{
"password_file": "group_vars/password1.yml",
"url": "
https://url1.com",
"username": "account"
},
"release.sqls"
],
"jobs": []
},
"
item.jobs": []
}