jenkins_job_info – Get information about Jenkins jobs¶
New in version 2.5.
Synopsis¶
This module can be used to query information about which Jenkins jobs which already exists.
This module was called
jenkins_job_info
before Ansible 2.9. The usage did not change.
Aliases: jenkins_job_facts
Requirements¶
The below requirements are needed on the host that executes this module.
python-jenkins >= 0.4.12
Parameters¶
Examples¶
# Get all Jenkins jobs using basic auth
- jenkins_job_info:
user: admin
password: hunter2
register: my_jenkins_job_info
# Get all Jenkins jobs using the token
- jenkins_job_info:
user: admin
token: abcdefghijklmnop
register: my_jenkins_job_info
# Get info about a single job using basic auth
- jenkins_job_info:
name: some-job-name
user: admin
password: hunter2
register: my_jenkins_job_info
# Get info about a single job in a folder using basic auth
- jenkins_job_info:
name: some-folder-name/some-job-name
user: admin
password: hunter2
register: my_jenkins_job_info
# Get info about jobs matching a shell glob using basic auth
- jenkins_job_info:
glob: some-job-*
user: admin
password: hunter2
register: my_jenkins_job_info
# Get info about all failing jobs using basic auth
- jenkins_job_info:
color: red
user: admin
password: hunter2
register: my_jenkins_job_info
# Get info about passing jobs matching a shell glob using basic auth
- jenkins_job_info:
name: some-job-*
color: blue
user: admin
password: hunter2
register: my_jenkins_job_info
- name: Get the info from custom URL with token and validate_certs=False
jenkins_job_info:
user: admin
token: 126df5c60d66c66e3b75b11104a16a8a
url: https://jenkins.example.com
validate_certs: False
register: my_jenkins_job_info
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Status¶
This module is not guaranteed to have a backwards compatible interface. [preview]
This module is maintained by the Ansible Community. [community]
Authors¶
Chris St. Pierre (@stpierre)
Hint
If you notice any issues in this documentation, you can edit this document to improve it.