From 36daa7c48e84cb92f4b908cc043bf0edbc95f162 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Tue, 9 Mar 2021 21:23:20 +0100 Subject: [PATCH] Remove deprecated features scheduled for removal in 3.0.0 (#1926) * Remove deprecated features. * Remove ignore.txt entries. * Update changelogs/fragments/remove-deprecated-features.yml Co-authored-by: Joe Adams Co-authored-by: Joe Adams --- .../fragments/remove-deprecated-features.yml | 16 ++++ plugins/module_utils/redfish_utils.py | 18 ++-- .../cloud/centurylink/clc_aa_policy.py | 5 -- plugins/modules/files/iso_extract.py | 5 +- .../modules/monitoring/airbrake_deployment.py | 88 +++++-------------- plugins/modules/monitoring/bigpanda.py | 6 +- .../monitoring/datadog/datadog_monitor.py | 9 +- plugins/modules/notification/cisco_webex.py | 5 +- plugins/modules/packaging/os/pulp_repo.py | 23 +---- plugins/modules/packaging/os/xbps.py | 7 -- .../redfish/idrac_redfish_config.py | 25 ------ .../redfish/redfish_config.py | 26 +----- plugins/modules/system/syspatch.py | 13 +-- .../web_infrastructure/django_manage.py | 14 +-- tests/sanity/ignore-2.10.txt | 3 - tests/sanity/ignore-2.11.txt | 3 - 16 files changed, 58 insertions(+), 208 deletions(-) create mode 100644 changelogs/fragments/remove-deprecated-features.yml diff --git a/changelogs/fragments/remove-deprecated-features.yml b/changelogs/fragments/remove-deprecated-features.yml new file mode 100644 index 0000000000..9d202e9cec --- /dev/null +++ b/changelogs/fragments/remove-deprecated-features.yml @@ -0,0 +1,16 @@ +removed_features: +- "airbrake_deployment - removed deprecated ``token`` parameter. Use ``project_id`` and ``project_key`` instead." +- "bigpanda - the alias ``message`` has been removed. Use ``deployment_message`` instead." +- "cisco_spark, cisco_webex - the alias ``message`` has been removed. Use ``msg`` instead." +- "clc_aa_policy - the ``wait`` parameter has been removed. It did not have any effect." +- "datadog_monitor - the alias ``message`` has been removed. Use ``notification_message`` instead." +- "django_manage - the parameter ``liveserver`` has been removed." +- "idrac_redfish_config - the parameters ``manager_attribute_name`` and ``manager_attribute_value`` have been removed. Use ``manager_attributes`` instead." +- "iso_extract - the alias ``thirsty`` has been removed. Use ``force`` instead." +- "redfish_config - the parameters ``bios_attribute_name`` and ``bios_attribute_value`` have been removed. Use ``bios_attributes`` instead." +- "syspatch - the ``apply`` parameter has been removed. This is the default mode, so simply removing it will not change the behavior." +- "xbps - the ``force`` parameter has been removed. It did not have any effect." +- "redfish modules - issuing a data modification command without specifying the ID of the target System, Chassis or Manager resource when there is more than one is no longer allowed. Use the ``resource_id`` option to specify the target ID." +- "pulp_repo - the alias ``ca_cert`` has been removed. Use ``feed_ca_cert`` instead." +- "pulp_repo - the ``feed_client_cert`` parameter no longer defaults to the value of the ``client_cert`` parameter." +- "pulp_repo - the ``feed_client_key`` parameter no longer defaults to the value of the ``client_key`` parameter." diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 01b1f9a29f..0fd421a3e2 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -19,11 +19,10 @@ PATCH_HEADERS = {'content-type': 'application/json', 'accept': 'application/json 'OData-Version': '4.0'} DELETE_HEADERS = {'accept': 'application/json', 'OData-Version': '4.0'} -DEPRECATE_MSG = 'Issuing a data modification command without specifying the '\ - 'ID of the target %(resource)s resource when there is more '\ - 'than one %(resource)s will use the first one in the '\ - 'collection. Use the `resource_id` option to specify the '\ - 'target %(resource)s ID' +FAIL_MSG = 'Issuing a data modification command without specifying the '\ + 'ID of the target %(resource)s resource when there is more '\ + 'than one %(resource)s is no longer allowed. Use the `resource_id` '\ + 'option to specify the target %(resource)s ID.' class RedfishUtils(object): @@ -245,8 +244,7 @@ class RedfishUtils(object): 'ret': False, 'msg': "System resource %s not found" % self.resource_id} elif len(self.systems_uris) > 1: - self.module.deprecate(DEPRECATE_MSG % {'resource': 'System'}, - version='3.0.0', collection_name='community.general') # was Ansible 2.14 + self.module.fail_json(msg=FAIL_MSG % {'resource': 'System'}) return {'ret': True} def _find_updateservice_resource(self): @@ -296,8 +294,7 @@ class RedfishUtils(object): 'ret': False, 'msg': "Chassis resource %s not found" % self.resource_id} elif len(self.chassis_uris) > 1: - self.module.deprecate(DEPRECATE_MSG % {'resource': 'Chassis'}, - version='3.0.0', collection_name='community.general') # was Ansible 2.14 + self.module.fail_json(msg=FAIL_MSG % {'resource': 'Chassis'}) return {'ret': True} def _find_managers_resource(self): @@ -326,8 +323,7 @@ class RedfishUtils(object): 'ret': False, 'msg': "Manager resource %s not found" % self.resource_id} elif len(self.manager_uris) > 1: - self.module.deprecate(DEPRECATE_MSG % {'resource': 'Manager'}, - version='3.0.0', collection_name='community.general') # was Ansible 2.14 + self.module.fail_json(msg=FAIL_MSG % {'resource': 'Manager'}) return {'ret': True} def _get_all_action_info_values(self, action): diff --git a/plugins/modules/cloud/centurylink/clc_aa_policy.py b/plugins/modules/cloud/centurylink/clc_aa_policy.py index a275093773..88c27e20f5 100644 --- a/plugins/modules/cloud/centurylink/clc_aa_policy.py +++ b/plugins/modules/cloud/centurylink/clc_aa_policy.py @@ -30,10 +30,6 @@ options: required: False default: present choices: ['present','absent'] - wait: - description: - - This option does nothing and will be removed in community.general 3.0.0. - type: bool requirements: - python = 2.7 - requests >= 2.5.0 @@ -185,7 +181,6 @@ class ClcAntiAffinityPolicy: argument_spec = dict( name=dict(required=True), location=dict(required=True), - wait=dict(type='bool', removed_in_version='3.0.0', removed_from_collection='community.general'), # was Ansible 2.14 state=dict(default='present', choices=['present', 'absent']), ) return argument_spec diff --git a/plugins/modules/files/iso_extract.py b/plugins/modules/files/iso_extract.py index b84db39756..18c283cbf7 100644 --- a/plugins/modules/files/iso_extract.py +++ b/plugins/modules/files/iso_extract.py @@ -52,10 +52,8 @@ options: description: - If C(yes), which will replace the remote file when contents are different than the source. - If C(no), the file will only be extracted and copied if the destination does not already exist. - - Alias C(thirsty) has been deprecated and will be removed in community.general 3.0.0. type: bool default: yes - aliases: [ thirsty ] executable: description: - The path to the C(7z) executable to use for extracting files from the ISO. @@ -101,8 +99,7 @@ def main(): image=dict(type='path', required=True, aliases=['path', 'src']), dest=dict(type='path', required=True), files=dict(type='list', elements='str', required=True), - force=dict(type='bool', default=True, aliases=['thirsty'], - deprecated_aliases=[dict(name='thirsty', version='3.0.0', collection_name='community.general')]), + force=dict(type='bool', default=True), executable=dict(type='path'), # No default on purpose ), supports_check_mode=True, diff --git a/plugins/modules/monitoring/airbrake_deployment.py b/plugins/modules/monitoring/airbrake_deployment.py index 3e7938bfba..a7d7710a0a 100644 --- a/plugins/modules/monitoring/airbrake_deployment.py +++ b/plugins/modules/monitoring/airbrake_deployment.py @@ -17,18 +17,17 @@ author: short_description: Notify airbrake about app deployments description: - Notify airbrake about app deployments (see U(https://airbrake.io/docs/api/#deploys-v4)). - - Parameter I(token) has been deprecated for community.general 0.2.0. Please remove entry. options: project_id: description: - Airbrake PROJECT_ID - required: false + required: true type: str version_added: '0.2.0' project_key: description: - Airbrake PROJECT_KEY. - required: false + required: true type: str version_added: '0.2.0' environment: @@ -70,11 +69,6 @@ options: required: false default: 'yes' type: bool - token: - description: - - This parameter (API token) has been deprecated in community.general 0.2.0. Please remove it from your tasks. - required: false - type: str requirements: [] ''' @@ -111,9 +105,8 @@ def main(): module = AnsibleModule( argument_spec=dict( - token=dict(required=False, no_log=True, type='str'), - project_id=dict(required=False, no_log=True, type='str'), - project_key=dict(required=False, no_log=True, type='str'), + project_id=dict(required=True, no_log=True, type='str'), + project_key=dict(required=True, no_log=True, type='str'), environment=dict(required=True, type='str'), user=dict(required=False, type='str'), repo=dict(required=False, type='str'), @@ -123,8 +116,6 @@ def main(): validate_certs=dict(default=True, type='bool'), ), supports_check_mode=True, - required_together=[('project_id', 'project_key')], - mutually_exclusive=[('project_id', 'token')], ) # Build list of params @@ -134,65 +125,32 @@ def main(): if module.check_mode: module.exit_json(changed=True) - if module.params["token"]: - # v2 API documented at https://airbrake.io/docs/legacy-xml-api/#tracking-deploys - if module.params["environment"]: - params["deploy[rails_env]"] = module.params["environment"] + # v4 API documented at https://airbrake.io/docs/api/#create-deploy-v4 + if module.params["environment"]: + params["environment"] = module.params["environment"] - if module.params["user"]: - params["deploy[local_username]"] = module.params["user"] + if module.params["user"]: + params["username"] = module.params["user"] - if module.params["repo"]: - params["deploy[scm_repository]"] = module.params["repo"] + if module.params["repo"]: + params["repository"] = module.params["repo"] - if module.params["revision"]: - params["deploy[scm_revision]"] = module.params["revision"] + if module.params["revision"]: + params["revision"] = module.params["revision"] - # version not supported in v2 API; omit + if module.params["version"]: + params["version"] = module.params["version"] - module.deprecate("Parameter 'token' is deprecated since community.general 0.2.0. Please remove " - "it and use 'project_id' and 'project_key' instead", - version='3.0.0', collection_name='community.general') # was Ansible 2.14 + # Build deploy url + url = module.params.get('url') + module.params["project_id"] + '/deploys?key=' + module.params["project_key"] + json_body = module.jsonify(params) - params["api_key"] = module.params["token"] + # Build header + headers = {'Content-Type': 'application/json'} - # Allow sending to Airbrake compliant v2 APIs - if module.params["url"] == 'https://api.airbrake.io/api/v4/projects/': - url = 'https://api.airbrake.io/deploys.txt' - else: - url = module.params["url"] - - # Send the data to airbrake - data = urlencode(params) - response, info = fetch_url(module, url, data=data) - - if module.params["project_id"] and module.params["project_key"]: - # v4 API documented at https://airbrake.io/docs/api/#create-deploy-v4 - if module.params["environment"]: - params["environment"] = module.params["environment"] - - if module.params["user"]: - params["username"] = module.params["user"] - - if module.params["repo"]: - params["repository"] = module.params["repo"] - - if module.params["revision"]: - params["revision"] = module.params["revision"] - - if module.params["version"]: - params["version"] = module.params["version"] - - # Build deploy url - url = module.params.get('url') + module.params["project_id"] + '/deploys?key=' + module.params["project_key"] - json_body = module.jsonify(params) - - # Build header - headers = {'Content-Type': 'application/json'} - - # Notify Airbrake of deploy - response, info = fetch_url(module, url, data=json_body, - headers=headers, method='POST') + # Notify Airbrake of deploy + response, info = fetch_url(module, url, data=json_body, + headers=headers, method='POST') if info['status'] == 200 or info['status'] == 201: module.exit_json(changed=True) diff --git a/plugins/modules/monitoring/bigpanda.py b/plugins/modules/monitoring/bigpanda.py index 8faec5d030..8392c19536 100644 --- a/plugins/modules/monitoring/bigpanda.py +++ b/plugins/modules/monitoring/bigpanda.py @@ -76,8 +76,6 @@ options: type: str description: - Message about the deployment. - - C(message) alias is deprecated in community.general 0.2.0, since it is used internally by Ansible Core Engine. - aliases: ['message'] version_added: '0.2.0' source_system: type: str @@ -148,9 +146,7 @@ def main(): env=dict(required=False), owner=dict(required=False), description=dict(required=False), - deployment_message=dict(required=False, aliases=['message'], - deprecated_aliases=[dict(name='message', version='3.0.0', - collection_name='community.general')]), # was Ansible 2.14 + deployment_message=dict(required=False), source_system=dict(required=False, default='ansible'), validate_certs=dict(default=True, type='bool'), url=dict(required=False, default='https://api.bigpanda.io'), diff --git a/plugins/modules/monitoring/datadog/datadog_monitor.py b/plugins/modules/monitoring/datadog/datadog_monitor.py index a737dd2085..8be71297f4 100644 --- a/plugins/modules/monitoring/datadog/datadog_monitor.py +++ b/plugins/modules/monitoring/datadog/datadog_monitor.py @@ -68,9 +68,7 @@ options: - A message to include with notifications for this monitor. - Email notifications can be sent to specific users by using the same '@username' notation as events. - Monitor message template variables can be accessed by using double square brackets, i.e '[[' and ']]'. - - C(message) alias is deprecated in community.general 0.2.0, since it is used internally by Ansible Core Engine. type: str - aliases: [ 'message' ] silenced: type: dict description: @@ -214,9 +212,7 @@ def main(): 'log alert', 'query alert', 'trace-analytics alert', 'rum alert']), name=dict(required=True), query=dict(), - notification_message=dict(no_log=True, aliases=['message'], - deprecated_aliases=[dict(name='message', version='3.0.0', - collection_name='community.general')]), # was Ansible 2.14 + notification_message=dict(no_log=True), silenced=dict(type='dict'), notify_no_data=dict(default=False, type='bool'), no_data_timeframe=dict(), @@ -239,9 +235,6 @@ def main(): if not HAS_DATADOG: module.fail_json(msg=missing_required_lib('datadogpy'), exception=DATADOG_IMP_ERR) - if 'message' in module.params: - module.fail_json(msg="'message' is reserved keyword, please change this parameter to 'notification_message'") - options = { 'api_key': module.params['api_key'], 'api_host': module.params['api_host'], diff --git a/plugins/modules/notification/cisco_webex.py b/plugins/modules/notification/cisco_webex.py index 4015c1852c..8c1361fb14 100644 --- a/plugins/modules/notification/cisco_webex.py +++ b/plugins/modules/notification/cisco_webex.py @@ -55,7 +55,6 @@ options: - The message you would like to send. required: yes type: str - aliases: ['message'] ''' EXAMPLES = """ @@ -174,9 +173,7 @@ def main(): recipient_id=dict(required=True, no_log=True), msg_type=dict(required=False, default='text', aliases=['message_type'], choices=['text', 'markdown']), personal_token=dict(required=True, no_log=True, aliases=['token']), - msg=dict(required=True, aliases=['message'], - deprecated_aliases=[dict(name='message', version='3.0.0', - collection_name='community.general')]), # was Ansible 2.14 + msg=dict(required=True), ), supports_check_mode=True diff --git a/plugins/modules/packaging/os/pulp_repo.py b/plugins/modules/packaging/os/pulp_repo.py index 8dbc6b9ac4..23d0b02eb4 100644 --- a/plugins/modules/packaging/os/pulp_repo.py +++ b/plugins/modules/packaging/os/pulp_repo.py @@ -46,9 +46,8 @@ options: description: - CA certificate string used to validate the feed source SSL certificate. This can be the file content or the path to the file. - The ca_cert alias will be removed in community.general 3.0.0. type: str - aliases: [ importer_ssl_ca_cert, ca_cert ] + aliases: [ importer_ssl_ca_cert ] feed_client_cert: description: - Certificate used as the client certificate when synchronizing the @@ -57,8 +56,6 @@ options: certificate. The specified file may be the certificate itself or a single file containing both the certificate and private key. This can be the file content or the path to the file. - - If not specified the default value will come from client_cert. Which will - change in community.general 3.0.0. type: str aliases: [ importer_ssl_client_cert ] feed_client_key: @@ -66,8 +63,6 @@ options: - Private key to the certificate specified in I(importer_ssl_client_cert), assuming it is not included in the certificate file itself. This can be the file content or the path to the file. - - If not specified the default value will come from client_key. Which will - change in community.general 3.0.0. type: str aliases: [ importer_ssl_client_key ] name: @@ -541,9 +536,7 @@ def main(): add_export_distributor=dict(default=False, type='bool'), feed=dict(), generate_sqlite=dict(default=False, type='bool'), - feed_ca_cert=dict(aliases=['importer_ssl_ca_cert', 'ca_cert'], - deprecated_aliases=[dict(name='ca_cert', version='3.0.0', - collection_name='community.general')]), # was Ansible 2.14 + feed_ca_cert=dict(aliases=['importer_ssl_ca_cert']), feed_client_cert=dict(aliases=['importer_ssl_client_cert']), feed_client_key=dict(aliases=['importer_ssl_client_key'], no_log=True), name=dict(required=True, aliases=['repo']), @@ -571,19 +564,7 @@ def main(): generate_sqlite = module.params['generate_sqlite'] importer_ssl_ca_cert = module.params['feed_ca_cert'] importer_ssl_client_cert = module.params['feed_client_cert'] - if importer_ssl_client_cert is None and module.params['client_cert'] is not None: - importer_ssl_client_cert = module.params['client_cert'] - module.deprecate("To specify client certificates to be used with the repo to sync, and not for communication with the " - "Pulp instance, use the new options `feed_client_cert` and `feed_client_key` (available since " - "Ansible 2.9.2). Until community.general 3.0.0, the default value for `feed_client_cert` will be " - "taken from `client_cert` if only the latter is specified", - version="3.0.0", collection_name='community.general') # was Ansible 2.14 importer_ssl_client_key = module.params['feed_client_key'] - if importer_ssl_client_key is None and module.params['client_key'] is not None: - importer_ssl_client_key = module.params['client_key'] - module.deprecate("In Ansible 2.9.2 `feed_client_key` option was added. Until community.general 3.0.0 the default " - "value will come from client_key option", - version="3.0.0", collection_name='community.general') # was Ansible 2.14 proxy_host = module.params['proxy_host'] proxy_port = module.params['proxy_port'] proxy_username = module.params['proxy_username'] diff --git a/plugins/modules/packaging/os/xbps.py b/plugins/modules/packaging/os/xbps.py index 69163a4744..8d314ea859 100644 --- a/plugins/modules/packaging/os/xbps.py +++ b/plugins/modules/packaging/os/xbps.py @@ -61,12 +61,6 @@ options: type: bool default: yes version_added: '0.2.0' - force: - description: - - This option doesn't have any effect and is deprecated, it will be - removed in 3.0.0. - type: bool - default: no ''' EXAMPLES = ''' @@ -289,7 +283,6 @@ def main(): 'latest', 'absent', 'removed']), recurse=dict(default=False, type='bool'), - force=dict(default=False, type='bool', removed_in_version='3.0.0', removed_from_collection='community.general'), upgrade=dict(default=False, type='bool'), update_cache=dict( default=True, aliases=['update-cache'], type='bool', diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_config.py b/plugins/modules/remote_management/redfish/idrac_redfish_config.py index b8b8cce10a..a3525fa9c8 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_config.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_config.py @@ -45,16 +45,6 @@ options: description: - Password for authentication with iDRAC type: str - manager_attribute_name: - required: false - description: - - (deprecated) name of iDRAC attribute to update - type: str - manager_attribute_value: - required: false - description: - - (deprecated) value of iDRAC attribute to update - type: str manager_attributes: required: false description: @@ -183,12 +173,6 @@ class IdracRedfishUtils(RedfishUtils): manager_uri = command_manager_attributes_uri_map.get(command, self.manager_uri) attributes = self.module.params['manager_attributes'] - manager_attr_name = self.module.params.get('manager_attribute_name') - manager_attr_value = self.module.params.get('manager_attribute_value') - - # manager attributes to update - if manager_attr_name: - attributes.update({manager_attr_name: manager_attr_value}) attrs_to_patch = {} attrs_skipped = {} @@ -250,8 +234,6 @@ def main(): baseuri=dict(required=True), username=dict(required=True), password=dict(required=True, no_log=True), - manager_attribute_name=dict(default=None), - manager_attribute_value=dict(default=None), manager_attributes=dict(type='dict', default={}), timeout=dict(type='int', default=10), resource_id=dict() @@ -310,13 +292,6 @@ def main(): if command in ["SetManagerAttributes", "SetLifecycleControllerAttributes", "SetSystemAttributes"]: result = rf_utils.set_manager_attributes(command) - if any((module.params['manager_attribute_name'], module.params['manager_attribute_value'])): - module.deprecate(msg='Arguments `manager_attribute_name` and ' - '`manager_attribute_value` are deprecated. ' - 'Use `manager_attributes` instead for passing in ' - 'the manager attribute name and value pairs', - version='3.0.0', collection_name='community.general') # was Ansible 2.13 - # Return data back or fail with proper message if result['ret'] is True: module.exit_json(changed=result['changed'], msg=to_native(result['msg'])) diff --git a/plugins/modules/remote_management/redfish/redfish_config.py b/plugins/modules/remote_management/redfish/redfish_config.py index 1ca30bfa86..ecc170437b 100644 --- a/plugins/modules/remote_management/redfish/redfish_config.py +++ b/plugins/modules/remote_management/redfish/redfish_config.py @@ -43,18 +43,6 @@ options: description: - Password for authentication with OOB controller type: str - bios_attribute_name: - required: false - description: - - name of BIOS attr to update (deprecated - use bios_attributes instead) - default: 'null' - type: str - bios_attribute_value: - required: false - description: - - value of BIOS attr to update (deprecated - use bios_attributes instead) - default: 'null' - type: raw bios_attributes: required: false description: @@ -129,13 +117,13 @@ EXAMPLES = ''' username: "{{ username }}" password: "{{ password }}" - - name: Enable PXE Boot for NIC1 using deprecated options + - name: Enable PXE Boot for NIC1 community.general.redfish_config: category: Systems command: SetBiosAttributes resource_id: 437XR1138R2 - bios_attribute_name: PxeDev1EnDis - bios_attribute_value: Enabled + bios_attributes: + PxeDev1EnDis: Enabled baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -233,8 +221,6 @@ def main(): baseuri=dict(required=True), username=dict(required=True), password=dict(required=True, no_log=True), - bios_attribute_name=dict(default='null'), - bios_attribute_value=dict(default='null', type='raw'), bios_attributes=dict(type='dict', default={}), timeout=dict(type='int', default=10), boot_order=dict(type='list', elements='str', default=[]), @@ -264,12 +250,6 @@ def main(): # BIOS attributes to update bios_attributes = module.params['bios_attributes'] - if module.params['bios_attribute_name'] != 'null': - bios_attributes[module.params['bios_attribute_name']] = module.params[ - 'bios_attribute_value'] - module.deprecate(msg='The bios_attribute_name/bios_attribute_value ' - 'options are deprecated. Use bios_attributes instead', - version='3.0.0', collection_name='community.general') # was Ansible 2.14 # boot order boot_order = module.params['boot_order'] diff --git a/plugins/modules/system/syspatch.py b/plugins/modules/system/syspatch.py index 2483fb365d..6fcfaea0f5 100644 --- a/plugins/modules/system/syspatch.py +++ b/plugins/modules/system/syspatch.py @@ -17,13 +17,6 @@ description: - "Manage OpenBSD system patches using syspatch." options: - apply: - type: bool - description: - - Apply all available system patches. - - By default, apply all patches. - - Deprecated. Will be removed in community.general 3.0.0. - default: yes revert: description: - Revert system patches. @@ -37,7 +30,6 @@ author: EXAMPLES = ''' - name: Apply all available system patches community.general.syspatch: - apply: true - name: Revert last patch community.general.syspatch: @@ -50,7 +42,6 @@ EXAMPLES = ''' # NOTE: You can reboot automatically if a patch requires it: - name: Apply all patches and store result community.general.syspatch: - apply: true register: syspatch - name: Reboot if patch requires it @@ -86,14 +77,12 @@ from ansible.module_utils.basic import AnsibleModule def run_module(): # define available arguments/parameters a user can pass to the module module_args = dict( - apply=dict(type='bool', default=True, removed_in_version='3.0.0', removed_from_collection='community.general'), revert=dict(type='str', choices=['all', 'one']) ) module = AnsibleModule( argument_spec=module_args, supports_check_mode=True, - required_one_of=[['apply', 'revert']] ) result = syspatch_run(module) @@ -117,7 +106,7 @@ def syspatch_run(module): run_flag = ['-R'] else: run_flag = ['-r'] - elif module.params['apply']: + else: check_flag = ['-c'] run_flag = [] diff --git a/plugins/modules/web_infrastructure/django_manage.py b/plugins/modules/web_infrastructure/django_manage.py index 10161c0426..ba38abd90e 100644 --- a/plugins/modules/web_infrastructure/django_manage.py +++ b/plugins/modules/web_infrastructure/django_manage.py @@ -101,14 +101,6 @@ options: C(collectstatic) command. required: false type: bool - liveserver: - description: - - This parameter was implemented a long time ago in a galaxy far way. It probably relates to the - django-liveserver package, which is no longer updated. - - Hence, it will be considered DEPRECATED and should be removed in a future release. - type: str - required: false - aliases: [live_server] testrunner: description: - "From the Django docs: Controls the test runner class that is used to execute tests." @@ -233,7 +225,7 @@ def main(): flush=('database', ), loaddata=('database', 'fixtures', ), syncdb=('database', ), - test=('failfast', 'testrunner', 'liveserver', 'apps', ), + test=('failfast', 'testrunner', 'apps', ), validate=(), migrate=('apps', 'skip', 'merge', 'database',), collectstatic=('clear', 'link', ), @@ -253,7 +245,7 @@ def main(): ) # These params are allowed for certain commands only - specific_params = ('apps', 'clear', 'database', 'failfast', 'fixtures', 'liveserver', 'testrunner') + specific_params = ('apps', 'clear', 'database', 'failfast', 'fixtures', 'testrunner') # These params are automatically added to the command if present general_params = ('settings', 'pythonpath', 'database',) @@ -274,8 +266,6 @@ def main(): database=dict(default=None, required=False, type='str'), failfast=dict(default=False, required=False, type='bool', aliases=['fail_fast']), fixtures=dict(default=None, required=False, type='str'), - liveserver=dict(default=None, required=False, type='str', aliases=['live_server'], - removed_in_version='3.0.0', removed_from_collection='community.general'), testrunner=dict(default=None, required=False, type='str', aliases=['test_runner']), skip=dict(default=None, required=False, type='bool'), merge=dict(default=None, required=False, type='bool'), diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index ffd03919ac..6cc090eefd 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -107,14 +107,11 @@ plugins/modules/cloud/xenserver/xenserver_guest.py validate-modules:undocumented plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/monitoring/bigpanda.py validate-modules:invalid-argument-name -plugins/modules/monitoring/datadog/datadog_monitor.py validate-modules:invalid-argument-name plugins/modules/net_tools/ldap/ldap_attr.py validate-modules:parameter-type-not-in-doc # This triggers when a parameter is undocumented plugins/modules/net_tools/ldap/ldap_attr.py validate-modules:undocumented-parameter # Parameter removed but reason for removal is shown by custom code plugins/modules/net_tools/ldap/ldap_entry.py validate-modules:doc-missing-type plugins/modules/net_tools/ldap/ldap_entry.py validate-modules:parameter-type-not-in-doc plugins/modules/net_tools/ldap/ldap_entry.py validate-modules:undocumented-parameter # Parameter removed but reason for removal is shown by custom code -plugins/modules/notification/cisco_webex.py validate-modules:invalid-argument-name plugins/modules/notification/grove.py validate-modules:invalid-argument-name plugins/modules/packaging/language/composer.py validate-modules:parameter-invalid plugins/modules/packaging/os/apt_rpm.py validate-modules:parameter-invalid diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 6e386e91d9..b718639b77 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -106,14 +106,11 @@ plugins/modules/cloud/xenserver/xenserver_guest.py validate-modules:undocumented plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice -plugins/modules/monitoring/bigpanda.py validate-modules:invalid-argument-name -plugins/modules/monitoring/datadog/datadog_monitor.py validate-modules:invalid-argument-name plugins/modules/net_tools/ldap/ldap_attr.py validate-modules:parameter-type-not-in-doc # This triggers when a parameter is undocumented plugins/modules/net_tools/ldap/ldap_attr.py validate-modules:undocumented-parameter # Parameter removed but reason for removal is shown by custom code plugins/modules/net_tools/ldap/ldap_entry.py validate-modules:doc-missing-type plugins/modules/net_tools/ldap/ldap_entry.py validate-modules:parameter-type-not-in-doc plugins/modules/net_tools/ldap/ldap_entry.py validate-modules:undocumented-parameter # Parameter removed but reason for removal is shown by custom code -plugins/modules/notification/cisco_webex.py validate-modules:invalid-argument-name plugins/modules/notification/grove.py validate-modules:invalid-argument-name plugins/modules/packaging/language/composer.py validate-modules:parameter-invalid plugins/modules/packaging/os/apt_rpm.py validate-modules:parameter-invalid