diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000..b35c52441b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +# Placeholder changelog + +This file is a placeholder; a version-specific `CHANGELOG-vX.md` will be generated during releases from fragments +under `changelogs/fragments`. On release branches once a release has been created, consult the branch's version-specific +file for changes that have occurred in that branch. diff --git a/CHANGELOG.md.license b/CHANGELOG.md.license new file mode 100644 index 0000000000..edff8c7685 --- /dev/null +++ b/CHANGELOG.md.license @@ -0,0 +1,3 @@ +GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) +SPDX-License-Identifier: GPL-3.0-or-later +SPDX-FileCopyrightText: Ansible Project diff --git a/README.md b/README.md index f4f3647f5e..96b3c952db 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ See the [Releasing guidelines](https://github.com/ansible/community-docs/blob/ma ## Release notes -See the [changelog](https://github.com/ansible-collections/community.general/blob/main/CHANGELOG.rst). +See the [changelog](https://github.com/ansible-collections/community.general/blob/main/CHANGELOG.md). ## Roadmap diff --git a/changelogs/config.yaml b/changelogs/config.yaml index 52e101e11f..23afe36d29 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -12,6 +12,9 @@ mention_ancestor: true flatmap: true new_plugins_after_name: removed_features notesdir: fragments +output_formats: + - md + - rst prelude_section_name: release_summary prelude_section_title: Release Summary sections: diff --git a/changelogs/fragments/7916-add-redfish-set-service-identification.yml b/changelogs/fragments/7916-add-redfish-set-service-identification.yml new file mode 100644 index 0000000000..2b1f2ca7b3 --- /dev/null +++ b/changelogs/fragments/7916-add-redfish-set-service-identification.yml @@ -0,0 +1,2 @@ +minor_changes: + - redfish_config - add command ``SetServiceIdentification`` to set service identification (https://github.com/ansible-collections/community.general/issues/7916). diff --git a/plugins/module_utils/redfish_utils.py b/plugins/module_utils/redfish_utils.py index 0d6609f8cc..262b2774d2 100644 --- a/plugins/module_utils/redfish_utils.py +++ b/plugins/module_utils/redfish_utils.py @@ -3408,6 +3408,11 @@ class RedfishUtils(object): result['ret'] = True return result + def set_service_identification(self, service_id): + data = {"ServiceIdentification": service_id} + resp = self.patch_request(self.root_uri + '/redfish/v1/Managers/' + self.resource_id, data, check_pyld=True) + return resp + def set_session_service(self, sessions_config): if sessions_config is None: return {'ret': False, 'msg': diff --git a/plugins/modules/redfish_config.py b/plugins/modules/redfish_config.py index 13b495df58..1fea9e7cd1 100644 --- a/plugins/modules/redfish_config.py +++ b/plugins/modules/redfish_config.py @@ -88,6 +88,12 @@ options: - ID of the System, Manager or Chassis to modify. type: str version_added: '0.2.0' + service_id: + required: false + description: + - ID of the manager to update. + type: str + version_added: '8.4.0' nic_addr: required: false description: @@ -334,6 +340,15 @@ EXAMPLES = ''' RAIDType: "RAID0" Drives: - "/redfish/v1/Systems/1/Storage/DE00B000/Drives/1" + + - name: Set service identification to {{ service_id }} + community.general.redfish_config: + category: Manager + command: SetServiceIdentification + service_id: "{{ service_id }}" + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" ''' RETURN = ''' @@ -353,7 +368,7 @@ from ansible.module_utils.common.text.converters import to_native CATEGORY_COMMANDS_ALL = { "Systems": ["SetBiosDefaultSettings", "SetBiosAttributes", "SetBootOrder", "SetDefaultBootOrder", "EnableSecureBoot", "SetSecureBoot", "DeleteVolumes", "CreateVolume"], - "Manager": ["SetNetworkProtocols", "SetManagerNic", "SetHostInterface"], + "Manager": ["SetNetworkProtocols", "SetManagerNic", "SetHostInterface", "SetServiceIdentification"], "Sessions": ["SetSessionService"], } @@ -376,6 +391,7 @@ def main(): default={} ), resource_id=dict(), + service_id=dict(), nic_addr=dict(default='null'), nic_config=dict( type='dict', @@ -445,6 +461,9 @@ def main(): # HostInterface instance ID hostinterface_id = module.params['hostinterface_id'] + # Service Identification + service_id = module.params['service_id'] + # Sessions config options sessions_config = module.params['sessions_config'] @@ -512,6 +531,8 @@ def main(): result = rf_utils.set_manager_nic(nic_addr, nic_config) elif command == "SetHostInterface": result = rf_utils.set_hostinterface_attributes(hostinterface_config, hostinterface_id) + elif command == "SetServiceIdentification": + result = rf_utils.set_service_identification(service_id) elif category == "Sessions": # execute only if we find a Sessions resource