community.general.rundeck_job_run module – Run a Rundeck job
Note
This module is part of the community.general collection (version 9.5.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.rundeck_job_run
.
New in community.general 3.8.0
Synopsis
This module runs a Rundeck job specified by ID.
Parameters
Parameter |
Comments |
---|---|
Send a job abort request if exceeded the Choices:
|
|
Rundeck User API Token. |
|
Rundeck API version to be used. API version must be at least 14. Default: |
|
PEM formatted certificate chain file to be used for SSL client authentication. This file can also include the key as well, and if the key is included, |
|
PEM formatted file that contains your private key to be used for SSL client authentication. If |
|
Filter the nodes where the jobs must run. See https://docs.rundeck.com/docs/manual/11-node-filters.html#node-filter-syntax. |
|
If Choices:
|
|
Credentials specified with Choices:
|
|
Header to identify as, generally appears in web server logs. Default: |
|
The job unique ID. |
|
The job options for the steps. Numeric values must be quoted. |
|
Log level configuration. Choices:
|
|
Schedule the job execution to run at specific date and time. ISO-8601 date and time format like |
|
Rundeck instance URL. |
|
The password for use in HTTP basic authentication. If the |
|
The username for use in HTTP basic authentication. This parameter can be used without |
|
Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos through Negotiate authentication. Requires the Python library gssapi to be installed. Credentials for GSSAPI can be specified with NTLM authentication is not supported even if the GSSAPI mech for NTLM has been installed. Choices:
|
|
If Choices:
|
|
If This should only be used on personally controlled sites using self-signed certificates. Choices:
|
|
Wait until the job finished the execution. Choices:
|
|
Delay, in seconds, between job execution status check requests. Default: |
|
Job execution wait timeout in seconds. If the timeout is reached, the job will be aborted. Keep in mind that there is a sleep based on Default: |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: none |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Examples
- name: Run a Rundeck job
community.general.rundeck_job_run:
url: "https://rundeck.example.org"
api_version: 39
api_token: "mytoken"
job_id: "xxxxxxxxxxxxxxxxx"
register: rundeck_job_run
- name: Show execution info
ansible.builtin.debug:
var: rundeck_job_run.execution_info
- name: Run a Rundeck job with options
community.general.rundeck_job_run:
url: "https://rundeck.example.org"
api_version: 39
api_token: "mytoken"
job_id: "xxxxxxxxxxxxxxxxx"
job_options:
option_1: "value_1"
option_2: "value_3"
option_3: "value_3"
register: rundeck_job_run
- name: Run a Rundeck job with timeout, delay between status check and abort on timeout
community.general.rundeck_job_run:
url: "https://rundeck.example.org"
api_version: 39
api_token: "mytoken"
job_id: "xxxxxxxxxxxxxxxxx"
wait_execution_timeout: 30
wait_execution_delay: 10
abort_on_timeout: true
register: rundeck_job_run
- name: Schedule a Rundeck job
community.general.rundeck_job_run:
url: "https://rundeck.example.org"
api_version: 39
api_token: "mytoken"
job_id: "xxxxxxxxxxxxxxxxx"
run_at_time: "2021-10-05T15:45:00-03:00"
register: rundeck_job_schedule
- name: Fire-and-forget a Rundeck job
community.general.rundeck_job_run:
url: "https://rundeck.example.org"
api_version: 39
api_token: "mytoken"
job_id: "xxxxxxxxxxxxxxxxx"
wait_execution: false
register: rundeck_job_run
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Rundeck job execution metadata. Returned: always Sample: |