community.general.rundeck_job_run module – Run a Rundeck job
Note
This module is part of the community.general collection (version 5.8.3).
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 wait_execution_timeout specified. 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 url_username and url_password should be passed in HTTP Header. 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 url_username parameter is not specified, the url_password parameter will not be used. |
|
The username for use in HTTP basic authentication. This parameter can be used without url_password for sites that allow empty passwords |
|
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 url_username/url_password or with the GSSAPI env var NTLM authentication is 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 wait_execution_delay after each job status check. Default: |
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: |
Collection links
Issue Tracker Repository (Sources) Submit a bug report Request a feature Communication