From bd4da7f2c0e58c53d711c1bd30c93b5ea70a5a6c Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Fri, 24 Feb 2023 11:04:27 +0100 Subject: [PATCH] [PR #5957/1f1ae558 backport][stable-6] Add attributes to consul, datadog, jenkins, pagerduty, rundeck, and sensu modules (#6057) Add attributes to consul, datadog, jenkins, pagerduty, rundeck, and sensu modules (#5957) * Add attributes to consul, datadog, jenkins, pagerduty, rundeck, and sensu modules. * Fix error. (cherry picked from commit 1f1ae558f9cee4b2984660d70987e1afb3fb8a8d) Co-authored-by: Felix Fontein --- plugins/modules/consul.py | 7 +++++++ plugins/modules/consul_acl.py | 7 +++++++ plugins/modules/consul_kv.py | 7 +++++++ plugins/modules/consul_session.py | 9 ++++++++- plugins/modules/datadog_downtime.py | 7 +++++++ plugins/modules/datadog_event.py | 15 +++++++++++---- plugins/modules/datadog_monitor.py | 7 +++++++ plugins/modules/jenkins_build.py | 7 +++++++ plugins/modules/jenkins_job.py | 7 +++++++ plugins/modules/jenkins_plugin.py | 11 +++++++++-- plugins/modules/jenkins_script.py | 9 +++++++++ plugins/modules/pagerduty.py | 7 +++++++ plugins/modules/pagerduty_alert.py | 7 +++++++ plugins/modules/pagerduty_change.py | 11 +++++++++-- plugins/modules/pagerduty_user.py | 9 +++++++-- plugins/modules/rundeck_acl_policy.py | 9 ++++++++- plugins/modules/rundeck_job_run.py | 8 +++++++- plugins/modules/rundeck_project.py | 9 ++++++++- plugins/modules/sensu_check.py | 7 +++++++ plugins/modules/sensu_client.py | 7 +++++++ plugins/modules/sensu_handler.py | 7 +++++++ plugins/modules/sensu_silence.py | 7 +++++++ plugins/modules/sensu_subscription.py | 7 +++++++ 23 files changed, 174 insertions(+), 14 deletions(-) diff --git a/plugins/modules/consul.py b/plugins/modules/consul.py index dea853b98e..cc599be36d 100644 --- a/plugins/modules/consul.py +++ b/plugins/modules/consul.py @@ -33,6 +33,13 @@ requirements: - python-consul - requests author: "Steve Gargan (@sgargan)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str diff --git a/plugins/modules/consul_acl.py b/plugins/modules/consul_acl.py index b9f14db164..91f955228a 100644 --- a/plugins/modules/consul_acl.py +++ b/plugins/modules/consul_acl.py @@ -19,6 +19,13 @@ description: author: - Steve Gargan (@sgargan) - Colin Nolan (@colin-nolan) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: mgmt_token: description: diff --git a/plugins/modules/consul_kv.py b/plugins/modules/consul_kv.py index 3419e3322b..a4457f2445 100644 --- a/plugins/modules/consul_kv.py +++ b/plugins/modules/consul_kv.py @@ -26,6 +26,13 @@ requirements: author: - Steve Gargan (@sgargan) - Colin Nolan (@colin-nolan) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: description: diff --git a/plugins/modules/consul_session.py b/plugins/modules/consul_session.py index 062eb3befe..246d13846f 100644 --- a/plugins/modules/consul_session.py +++ b/plugins/modules/consul_session.py @@ -20,7 +20,14 @@ requirements: - python-consul - requests author: -- Steve Gargan (@sgargan) + - Steve Gargan (@sgargan) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: id: description: diff --git a/plugins/modules/datadog_downtime.py b/plugins/modules/datadog_downtime.py index 8a1acf7e83..fd8421431d 100644 --- a/plugins/modules/datadog_downtime.py +++ b/plugins/modules/datadog_downtime.py @@ -22,6 +22,13 @@ author: requirements: - datadog-api-client - Python 3.6+ +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: api_key: description: diff --git a/plugins/modules/datadog_event.py b/plugins/modules/datadog_event.py index 0a669c4a81..b8161eca64 100644 --- a/plugins/modules/datadog_event.py +++ b/plugins/modules/datadog_event.py @@ -19,11 +19,18 @@ DOCUMENTATION = ''' module: datadog_event short_description: Posts events to Datadog service description: -- "Allows to post events to Datadog (www.datadoghq.com) service." -- "Uses http://docs.datadoghq.com/api/#events API." + - "Allows to post events to Datadog (www.datadoghq.com) service." + - "Uses http://docs.datadoghq.com/api/#events API." author: -- "Artūras 'arturaz' Šlajus (@arturaz)" -- "Naoya Nakazawa (@n0ts)" + - "Artūras 'arturaz' Šlajus (@arturaz)" + - "Naoya Nakazawa (@n0ts)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: api_key: type: str diff --git a/plugins/modules/datadog_monitor.py b/plugins/modules/datadog_monitor.py index ef6aa84255..f58df358b7 100644 --- a/plugins/modules/datadog_monitor.py +++ b/plugins/modules/datadog_monitor.py @@ -19,6 +19,13 @@ description: - The type C(event-v2) was added in community.general 4.8.0. author: Sebastian Kornehl (@skornehl) requirements: [datadog] +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: api_key: description: diff --git a/plugins/modules/jenkins_build.py b/plugins/modules/jenkins_build.py index b02027f229..4f95202244 100644 --- a/plugins/modules/jenkins_build.py +++ b/plugins/modules/jenkins_build.py @@ -20,6 +20,13 @@ requirements: author: - Brett Milford (@brettmilford) - Tong He (@unnecessary-username) +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: args: description: diff --git a/plugins/modules/jenkins_job.py b/plugins/modules/jenkins_job.py index 0ea52ab36b..09b006448e 100644 --- a/plugins/modules/jenkins_job.py +++ b/plugins/modules/jenkins_job.py @@ -17,6 +17,13 @@ description: requirements: - "python-jenkins >= 0.4.12" author: "Sergio Millan Rodriguez (@sermilrod)" +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: full options: config: type: str diff --git a/plugins/modules/jenkins_plugin.py b/plugins/modules/jenkins_plugin.py index 9c4c42e675..b3ebf3f93c 100644 --- a/plugins/modules/jenkins_plugin.py +++ b/plugins/modules/jenkins_plugin.py @@ -17,6 +17,12 @@ short_description: Add or remove Jenkins plugin description: - Ansible module which helps to manage Jenkins plugins. +attributes: + check_mode: + support: full + diff_mode: + support: none + options: group: type: str @@ -129,8 +135,9 @@ notes: parameter to point to the Jenkins server. The module must be used on the host where Jenkins runs as it needs direct access to the plugin files. extends_documentation_fragment: - - url - - files + - ansible.builtin.url + - ansible.builtin.files + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/jenkins_script.py b/plugins/modules/jenkins_script.py index 58d8e2c642..7f83ebcdbd 100644 --- a/plugins/modules/jenkins_script.py +++ b/plugins/modules/jenkins_script.py @@ -18,6 +18,15 @@ description: - The C(jenkins_script) module takes a script plus a dict of values to use within the script and returns the result of the script being run. +extends_documentation_fragment: + - community.general.attributes + +attributes: + check_mode: + support: none + diff_mode: + support: none + options: script: type: str diff --git a/plugins/modules/pagerduty.py b/plugins/modules/pagerduty.py index 7df9cc1d16..bed3629bef 100644 --- a/plugins/modules/pagerduty.py +++ b/plugins/modules/pagerduty.py @@ -22,6 +22,13 @@ author: - "Bruce Pennypacker (@bpennypacker)" requirements: - PagerDuty API access +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: none + diff_mode: + support: none options: state: type: str diff --git a/plugins/modules/pagerduty_alert.py b/plugins/modules/pagerduty_alert.py index e6bd7a3c0c..45bec92c6d 100644 --- a/plugins/modules/pagerduty_alert.py +++ b/plugins/modules/pagerduty_alert.py @@ -18,6 +18,13 @@ author: - "Amanpreet Singh (@ApsOps)" requirements: - PagerDuty API access +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/pagerduty_change.py b/plugins/modules/pagerduty_change.py index 104e76e66a..6af5d58eae 100644 --- a/plugins/modules/pagerduty_change.py +++ b/plugins/modules/pagerduty_change.py @@ -19,6 +19,15 @@ author: - Adam Vaughan (@adamvaughan) requirements: - PagerDuty integration key +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + details: + - Check mode simply does nothing except returning C(changed=true) in case the I(url) seems to be correct. + diff_mode: + support: none options: integration_key: description: @@ -78,8 +87,6 @@ options: required: false default: true type: bool -notes: - - Supports C(check_mode). Note that check mode simply does nothing except returning C(changed=true) in case the I(url) seems to be correct. ''' EXAMPLES = ''' diff --git a/plugins/modules/pagerduty_user.py b/plugins/modules/pagerduty_user.py index e16fe59e76..9c9805bff3 100644 --- a/plugins/modules/pagerduty_user.py +++ b/plugins/modules/pagerduty_user.py @@ -19,6 +19,13 @@ author: Zainab Alsaffar (@zanssa) requirements: - pdpyras python module = 4.1.1 - PagerDuty API Access +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: access_token: description: @@ -56,8 +63,6 @@ options: - Required if I(state=present). type: list elements: str -notes: - - Supports C(check_mode). ''' EXAMPLES = r''' diff --git a/plugins/modules/rundeck_acl_policy.py b/plugins/modules/rundeck_acl_policy.py index 4830c44784..4f7e3ab8dc 100644 --- a/plugins/modules/rundeck_acl_policy.py +++ b/plugins/modules/rundeck_acl_policy.py @@ -19,6 +19,11 @@ short_description: Manage Rundeck ACL policies description: - Create, update and remove Rundeck ACL policies through HTTP API. author: "Loic Blot (@nerzhul)" +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: type: str @@ -76,7 +81,9 @@ options: version_added: '0.2.0' validate_certs: version_added: '0.2.0' -extends_documentation_fragment: url +extends_documentation_fragment: + - ansible.builtin.url + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/rundeck_job_run.py b/plugins/modules/rundeck_job_run.py index 0416d86fa7..894f1bb6f9 100644 --- a/plugins/modules/rundeck_job_run.py +++ b/plugins/modules/rundeck_job_run.py @@ -17,6 +17,11 @@ description: - 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 options: job_id: type: str @@ -68,7 +73,8 @@ options: default: false extends_documentation_fragment: - community.general.rundeck - - url + - ansible.builtin.url + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/rundeck_project.py b/plugins/modules/rundeck_project.py index 2039a00a02..2065a7d936 100644 --- a/plugins/modules/rundeck_project.py +++ b/plugins/modules/rundeck_project.py @@ -21,6 +21,11 @@ short_description: Manage Rundeck projects description: - Create and remove Rundeck projects through HTTP API. author: "Loic Blot (@nerzhul)" +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: type: str @@ -67,7 +72,9 @@ options: version_added: '0.2.0' validate_certs: version_added: '0.2.0' -extends_documentation_fragment: url +extends_documentation_fragment: + - ansible.builtin.url + - community.general.attributes ''' EXAMPLES = ''' diff --git a/plugins/modules/sensu_check.py b/plugins/modules/sensu_check.py index 07b7a060e1..1ac2316a84 100644 --- a/plugins/modules/sensu_check.py +++ b/plugins/modules/sensu_check.py @@ -18,6 +18,13 @@ description: - Most options do not have a default and will not be added to the check definition unless specified. - All defaults except I(path), I(state), I(backup) and I(metric) are not managed by this module, - they are simply specified for your convenience. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str diff --git a/plugins/modules/sensu_client.py b/plugins/modules/sensu_client.py index ffd1fe9fbd..2e0bd12eec 100644 --- a/plugins/modules/sensu_client.py +++ b/plugins/modules/sensu_client.py @@ -16,6 +16,13 @@ short_description: Manages Sensu client configuration description: - Manages Sensu client configuration. - 'For more information, refer to the Sensu documentation: U(https://sensuapp.org/docs/latest/reference/clients.html)' +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: type: str diff --git a/plugins/modules/sensu_handler.py b/plugins/modules/sensu_handler.py index 15e63e57d3..bbb8dc6129 100644 --- a/plugins/modules/sensu_handler.py +++ b/plugins/modules/sensu_handler.py @@ -16,6 +16,13 @@ short_description: Manages Sensu handler configuration description: - Manages Sensu handler configuration - 'For more information, refer to the Sensu documentation: U(https://sensuapp.org/docs/latest/reference/handlers.html)' +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: state: type: str diff --git a/plugins/modules/sensu_silence.py b/plugins/modules/sensu_silence.py index c5ed10e36d..14c664755d 100644 --- a/plugins/modules/sensu_silence.py +++ b/plugins/modules/sensu_silence.py @@ -17,6 +17,13 @@ short_description: Manage Sensu silence entries description: - Create and clear (delete) a silence entries via the Sensu API for subscriptions and checks. +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: check: type: str diff --git a/plugins/modules/sensu_subscription.py b/plugins/modules/sensu_subscription.py index a84d805221..0077e2ffa6 100644 --- a/plugins/modules/sensu_subscription.py +++ b/plugins/modules/sensu_subscription.py @@ -15,6 +15,13 @@ module: sensu_subscription short_description: Manage Sensu subscriptions description: - Manage which I(sensu channels) a machine should subscribe to +extends_documentation_fragment: + - community.general.attributes +attributes: + check_mode: + support: full + diff_mode: + support: none options: name: type: str