From 1b480e9f378f08de3a34a76ae5db9c7b337391e3 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 24 Aug 2022 19:59:30 +0200 Subject: [PATCH] Adjust booleans in monitoring modules. (#5156) --- plugins/modules/monitoring/airbrake_deployment.py | 4 ++-- plugins/modules/monitoring/bigpanda.py | 4 ++-- plugins/modules/monitoring/datadog/datadog_event.py | 4 ++-- .../modules/monitoring/datadog/datadog_monitor.py | 8 ++++---- plugins/modules/monitoring/honeybadger_deployment.py | 4 ++-- plugins/modules/monitoring/icinga2_host.py | 10 +++++----- plugins/modules/monitoring/newrelic_deployment.py | 4 ++-- plugins/modules/monitoring/pagerduty.py | 4 ++-- plugins/modules/monitoring/pagerduty_change.py | 4 ++-- plugins/modules/monitoring/rollbar_deployment.py | 4 ++-- plugins/modules/monitoring/sensu/sensu_check.py | 10 +++++----- plugins/modules/monitoring/sensu/sensu_client.py | 4 ++-- plugins/modules/monitoring/sensu/sensu_handler.py | 4 ++-- .../modules/monitoring/sensu/sensu_subscription.py | 4 ++-- plugins/modules/monitoring/spectrum_device.py | 10 +++++----- plugins/modules/monitoring/spectrum_model_attrs.py | 6 +++--- plugins/modules/monitoring/statusio_maintenance.py | 12 ++++++------ 17 files changed, 50 insertions(+), 50 deletions(-) diff --git a/plugins/modules/monitoring/airbrake_deployment.py b/plugins/modules/monitoring/airbrake_deployment.py index fd2bd018c2..2b3b1832f3 100644 --- a/plugins/modules/monitoring/airbrake_deployment.py +++ b/plugins/modules/monitoring/airbrake_deployment.py @@ -65,10 +65,10 @@ options: type: str validate_certs: description: - - If C(no), SSL certificates for the target url will not be validated. This should only be used + - If C(false), SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false - default: 'yes' + default: true type: bool requirements: [] diff --git a/plugins/modules/monitoring/bigpanda.py b/plugins/modules/monitoring/bigpanda.py index 2150750ed3..8c2a858877 100644 --- a/plugins/modules/monitoring/bigpanda.py +++ b/plugins/modules/monitoring/bigpanda.py @@ -68,10 +68,10 @@ options: default: https://api.bigpanda.io validate_certs: description: - - If C(no), SSL certificates for the target url will not be validated. This should only be used + - If C(false), SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false - default: 'yes' + default: true type: bool deployment_message: type: str diff --git a/plugins/modules/monitoring/datadog/datadog_event.py b/plugins/modules/monitoring/datadog/datadog_event.py index 45671dd7d7..0a669c4a81 100644 --- a/plugins/modules/monitoring/datadog/datadog_event.py +++ b/plugins/modules/monitoring/datadog/datadog_event.py @@ -75,10 +75,10 @@ options: description: ["An arbitrary string to use for aggregation."] validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true ''' EXAMPLES = ''' diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/monitoring/datadog/datadog_monitor.py index 0d0aacc0c7..ef6aa84255 100644 --- a/plugins/modules/monitoring/datadog/datadog_monitor.py +++ b/plugins/modules/monitoring/datadog/datadog_monitor.py @@ -91,7 +91,7 @@ options: description: - Whether this monitor will notify when data stops reporting. type: bool - default: 'no' + default: false no_data_timeframe: description: - The number of minutes before a monitor will notify when data stops reporting. @@ -116,7 +116,7 @@ options: description: - Whether tagged users will be notified on changes to this monitor. type: bool - default: 'no' + default: false thresholds: type: dict description: @@ -128,7 +128,7 @@ options: description: - Whether changes to this monitor should be restricted to the creator or admins. type: bool - default: 'no' + default: false require_full_window: description: - Whether this monitor needs a full window of data before it gets evaluated. @@ -153,7 +153,7 @@ options: description: - Whether notifications from this monitor automatically inserts its triggering tags into the title. type: bool - default: yes + default: true version_added: 1.3.0 priority: description: diff --git a/plugins/modules/monitoring/honeybadger_deployment.py b/plugins/modules/monitoring/honeybadger_deployment.py index b0dd0ea8bc..be8412f9af 100644 --- a/plugins/modules/monitoring/honeybadger_deployment.py +++ b/plugins/modules/monitoring/honeybadger_deployment.py @@ -45,10 +45,10 @@ options: default: "https://api.honeybadger.io/v1/deploys" validate_certs: description: - - If C(no), SSL certificates for the target url will not be validated. This should only be used + - If C(false), SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true ''' diff --git a/plugins/modules/monitoring/icinga2_host.py b/plugins/modules/monitoring/icinga2_host.py index 6b42a5d8da..a846c74f4c 100644 --- a/plugins/modules/monitoring/icinga2_host.py +++ b/plugins/modules/monitoring/icinga2_host.py @@ -26,16 +26,16 @@ options: - HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path use_proxy: description: - - If C(no), it will not use a proxy, even if one is defined in + - If C(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts. type: bool - default: 'yes' + default: true validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true url_username: type: str description: @@ -53,7 +53,7 @@ options: send a 401, logins will fail. This option forces the sending of the Basic authentication header upon initial request. type: bool - default: 'no' + default: false client_cert: type: path description: diff --git a/plugins/modules/monitoring/newrelic_deployment.py b/plugins/modules/monitoring/newrelic_deployment.py index d9b1fd770c..2fd4faf8e3 100644 --- a/plugins/modules/monitoring/newrelic_deployment.py +++ b/plugins/modules/monitoring/newrelic_deployment.py @@ -64,10 +64,10 @@ options: required: false validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false - default: 'yes' + default: true type: bool requirements: [] diff --git a/plugins/modules/monitoring/pagerduty.py b/plugins/modules/monitoring/pagerduty.py index c19ae2ac55..7df9cc1d16 100644 --- a/plugins/modules/monitoring/pagerduty.py +++ b/plugins/modules/monitoring/pagerduty.py @@ -73,10 +73,10 @@ options: default: Created by Ansible validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool - default: 'yes' + default: true ''' EXAMPLES = ''' diff --git a/plugins/modules/monitoring/pagerduty_change.py b/plugins/modules/monitoring/pagerduty_change.py index cc8f562eac..104e76e66a 100644 --- a/plugins/modules/monitoring/pagerduty_change.py +++ b/plugins/modules/monitoring/pagerduty_change.py @@ -73,10 +73,10 @@ options: type: str validate_certs: description: - - If C(no), SSL certificates for the target URL will not be validated. + - If C(false), SSL certificates for the target URL will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false - default: yes + 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. diff --git a/plugins/modules/monitoring/rollbar_deployment.py b/plugins/modules/monitoring/rollbar_deployment.py index 10762061f2..c899d60163 100644 --- a/plugins/modules/monitoring/rollbar_deployment.py +++ b/plugins/modules/monitoring/rollbar_deployment.py @@ -56,11 +56,11 @@ options: default: 'https://api.rollbar.com/api/1/deploy/' validate_certs: description: - - If C(no), SSL certificates for the target url will not be validated. + - If C(false), SSL certificates for the target url will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false - default: 'yes' + default: true type: bool ''' diff --git a/plugins/modules/monitoring/sensu/sensu_check.py b/plugins/modules/monitoring/sensu/sensu_check.py index dd955cc70f..943a653249 100644 --- a/plugins/modules/monitoring/sensu/sensu_check.py +++ b/plugins/modules/monitoring/sensu/sensu_check.py @@ -43,7 +43,7 @@ options: - Create a backup file (if yes), including the timestamp information so - you can get the original file back if you somehow clobbered it incorrectly. type: bool - default: 'no' + default: false command: type: str description: @@ -97,7 +97,7 @@ options: description: - Whether the check is a metric type: bool - default: 'no' + default: false standalone: description: - Whether the check should be scheduled by the sensu client or server @@ -153,7 +153,7 @@ EXAMPLES = ''' community.general.sensu_check: name: cpu_load command: /etc/sensu/plugins/system/cpu-mpstat-metrics.rb - metric: yes + metric: true handlers: relay subscribers: common interval: 60 @@ -328,7 +328,7 @@ def main(): arg_spec = {'name': {'type': 'str', 'required': True}, 'path': {'type': 'str', 'default': '/etc/sensu/conf.d/checks.json'}, 'state': {'type': 'str', 'default': 'present', 'choices': ['present', 'absent']}, - 'backup': {'type': 'bool', 'default': 'no'}, + 'backup': {'type': 'bool', 'default': False}, 'command': {'type': 'str'}, 'handlers': {'type': 'list', 'elements': 'str'}, 'subscribers': {'type': 'list', 'elements': 'str'}, @@ -339,7 +339,7 @@ def main(): 'subdue_begin': {'type': 'str'}, 'subdue_end': {'type': 'str'}, 'dependencies': {'type': 'list', 'elements': 'str'}, - 'metric': {'type': 'bool', 'default': 'no'}, + 'metric': {'type': 'bool', 'default': False}, 'standalone': {'type': 'bool'}, 'publish': {'type': 'bool'}, 'occurrences': {'type': 'int'}, diff --git a/plugins/modules/monitoring/sensu/sensu_client.py b/plugins/modules/monitoring/sensu/sensu_client.py index a142751d82..ffd1fe9fbd 100644 --- a/plugins/modules/monitoring/sensu/sensu_client.py +++ b/plugins/modules/monitoring/sensu/sensu_client.py @@ -44,7 +44,7 @@ options: description: - If safe mode is enabled for the client. Safe mode requires local check definitions in order to accept a check request and execute the check. type: bool - default: 'no' + default: false redact: type: list elements: str @@ -58,7 +58,7 @@ options: description: - If Sensu should monitor keepalives for this client. type: bool - default: 'yes' + default: true keepalive: type: dict description: diff --git a/plugins/modules/monitoring/sensu/sensu_handler.py b/plugins/modules/monitoring/sensu/sensu_handler.py index 08ea1335e6..cd56f38f70 100644 --- a/plugins/modules/monitoring/sensu/sensu_handler.py +++ b/plugins/modules/monitoring/sensu/sensu_handler.py @@ -64,12 +64,12 @@ options: description: - If events matching one or more silence entries should be handled. type: bool - default: 'no' + default: false handle_flapping: description: - If events in the flapping state should be handled. type: bool - default: 'no' + default: false command: type: str description: diff --git a/plugins/modules/monitoring/sensu/sensu_subscription.py b/plugins/modules/monitoring/sensu/sensu_subscription.py index 63170f337b..a84d805221 100644 --- a/plugins/modules/monitoring/sensu/sensu_subscription.py +++ b/plugins/modules/monitoring/sensu/sensu_subscription.py @@ -40,7 +40,7 @@ options: - can get the original file back if you somehow clobbered it incorrectly. type: bool required: false - default: no + default: false requirements: [ ] author: Anders Ingemann (@andsens) ''' @@ -133,7 +133,7 @@ def main(): arg_spec = {'name': {'type': 'str', 'required': True}, 'path': {'type': 'str', 'default': '/etc/sensu/conf.d/subscriptions.json'}, 'state': {'type': 'str', 'default': 'present', 'choices': ['present', 'absent']}, - 'backup': {'type': 'bool', 'default': 'no'}, + 'backup': {'type': 'bool', 'default': False}, } module = AnsibleModule(argument_spec=arg_spec, diff --git a/plugins/modules/monitoring/spectrum_device.py b/plugins/modules/monitoring/spectrum_device.py index 814aff46ed..a72fd029c8 100644 --- a/plugins/modules/monitoring/spectrum_device.py +++ b/plugins/modules/monitoring/spectrum_device.py @@ -65,16 +65,16 @@ options: use_proxy: required: false description: - - if C(no), it will not use a proxy, even if one is defined in an environment + - if C(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts. - default: 'yes' + default: true type: bool validate_certs: required: false description: - - If C(no), SSL certificates will not be validated. This should only be used + - If C(false), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. - default: 'yes' + default: true type: bool agentport: type: int @@ -108,7 +108,7 @@ EXAMPLES = ''' oneclick_url: http://oneclick.example.com:8080 oneclick_user: username oneclick_password: password - use_proxy: no + use_proxy: false state: absent ''' diff --git a/plugins/modules/monitoring/spectrum_model_attrs.py b/plugins/modules/monitoring/spectrum_model_attrs.py index ed60291d58..5a92802f5f 100644 --- a/plugins/modules/monitoring/spectrum_model_attrs.py +++ b/plugins/modules/monitoring/spectrum_model_attrs.py @@ -43,9 +43,9 @@ options: aliases: [password] use_proxy: description: - - if C(no), it will not use a proxy, even if one is defined in + - if C(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts. - default: yes + default: true required: false type: bool name: @@ -63,7 +63,7 @@ options: - Validate SSL certificates. Only change this to C(false) if you can guarantee that you are talking to the correct endpoint and there is no man-in-the-middle attack happening. type: bool - default: yes + default: true required: false attributes: description: diff --git a/plugins/modules/monitoring/statusio_maintenance.py b/plugins/modules/monitoring/statusio_maintenance.py index ab4cfbe361..711e8917d0 100644 --- a/plugins/modules/monitoring/statusio_maintenance.py +++ b/plugins/modules/monitoring/statusio_maintenance.py @@ -74,32 +74,32 @@ options: description: - If it affects all components and containers type: bool - default: 'no' + default: false automation: description: - Automatically start and end the maintenance window type: bool - default: 'no' + default: false maintenance_notify_now: description: - Notify subscribers now type: bool - default: 'no' + default: false maintenance_notify_72_hr: description: - Notify subscribers 72 hours before maintenance start time type: bool - default: 'no' + default: false maintenance_notify_24_hr: description: - Notify subscribers 24 hours before maintenance start time type: bool - default: 'no' + default: false maintenance_notify_1_hr: description: - Notify subscribers 1 hour before maintenance start time type: bool - default: 'no' + default: false maintenance_id: type: str description: