[PR #9354/97514612 backport][stable-10] r*: normalize docs (#9377)

r*: normalize docs (#9354)

* r*: normalize docs

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

* Apply suggestions from code review

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 9751461295)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2024-12-25 21:41:05 +01:00 committed by GitHub
parent 899fcb8749
commit f6fa7fb273
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 1858 additions and 1947 deletions

View file

@ -9,75 +9,74 @@ from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = '''
---
DOCUMENTATION = r"""
module: rundeck_job_run
short_description: Run a Rundeck job
description:
- This module runs a Rundeck job specified by ID.
- This module runs a Rundeck job specified by ID.
author: "Phillipe Smith (@phsmith)"
version_added: 3.8.0
attributes:
check_mode:
support: none
diff_mode:
support: none
check_mode:
support: none
diff_mode:
support: none
options:
job_id:
type: str
description:
- The job unique ID.
required: true
job_options:
type: dict
description:
- The job options for the steps.
- Numeric values must be quoted.
filter_nodes:
type: str
description:
- Filter the nodes where the jobs must run.
- See U(https://docs.rundeck.com/docs/manual/11-node-filters.html#node-filter-syntax).
run_at_time:
type: str
description:
- Schedule the job execution to run at specific date and time.
- ISO-8601 date and time format like V(2021-10-05T15:45:00-03:00).
loglevel:
type: str
description:
- Log level configuration.
choices: [debug, verbose, info, warn, error]
default: info
wait_execution:
type: bool
description:
- Wait until the job finished the execution.
default: true
wait_execution_delay:
type: int
description:
- Delay, in seconds, between job execution status check requests.
default: 5
wait_execution_timeout:
type: int
description:
- 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 O(wait_execution_delay) after each job status check.
default: 120
abort_on_timeout:
type: bool
description:
- Send a job abort request if exceeded the O(wait_execution_timeout) specified.
default: false
job_id:
type: str
description:
- The job unique ID.
required: true
job_options:
type: dict
description:
- The job options for the steps.
- Numeric values must be quoted.
filter_nodes:
type: str
description:
- Filter the nodes where the jobs must run.
- See U(https://docs.rundeck.com/docs/manual/11-node-filters.html#node-filter-syntax).
run_at_time:
type: str
description:
- Schedule the job execution to run at specific date and time.
- ISO-8601 date and time format like V(2021-10-05T15:45:00-03:00).
loglevel:
type: str
description:
- Log level configuration.
choices: [debug, verbose, info, warn, error]
default: info
wait_execution:
type: bool
description:
- Wait until the job finished the execution.
default: true
wait_execution_delay:
type: int
description:
- Delay, in seconds, between job execution status check requests.
default: 5
wait_execution_timeout:
type: int
description:
- 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 O(wait_execution_delay) after each job status check.
default: 120
abort_on_timeout:
type: bool
description:
- Send a job abort request if exceeded the O(wait_execution_timeout) specified.
default: false
extends_documentation_fragment:
- community.general.rundeck
- ansible.builtin.url
- community.general.attributes
'''
"""
EXAMPLES = '''
EXAMPLES = r"""
- name: Run a Rundeck job
community.general.rundeck_job_run:
url: "https://rundeck.example.org"
@ -97,9 +96,9 @@ EXAMPLES = '''
api_token: "mytoken"
job_id: "xxxxxxxxxxxxxxxxx"
job_options:
option_1: "value_1"
option_2: "value_3"
option_3: "value_3"
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
@ -130,9 +129,9 @@ EXAMPLES = '''
job_id: "xxxxxxxxxxxxxxxxx"
wait_execution: false
register: rundeck_job_run
'''
"""
RETURN = '''
RETURN = r"""
execution_info:
description: Rundeck job execution metadata.
returned: always
@ -177,7 +176,7 @@ execution_info:
"output": "Test!"
}
}
'''
"""
# Modules import
from datetime import datetime, timedelta