From e5d93a4f111f4cd6d8a92314427e247502bc6ed9 Mon Sep 17 00:00:00 2001 From: Jacob Yundt Date: Thu, 16 Apr 2020 15:03:13 -0400 Subject: [PATCH] redfish_config: fix support for boolean BIOS attributes Backport of ansible-collections/community.general#189 to stable-2.9 Currently the redfish_config module will convert boolean bios_attribute_value settings to strings (type str). This will cause BMCs expecting booleans to error out. This PR will change the default type of bios_attribute_value to 'raw' in order to support strings and booleans. Fixes #68251 --- .../68251-redfish_config-fix-boolean-bios-attr-support.yaml | 3 +++ .../modules/remote_management/redfish/redfish_config.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/68251-redfish_config-fix-boolean-bios-attr-support.yaml diff --git a/changelogs/fragments/68251-redfish_config-fix-boolean-bios-attr-support.yaml b/changelogs/fragments/68251-redfish_config-fix-boolean-bios-attr-support.yaml new file mode 100644 index 00000000000..20ba44073a8 --- /dev/null +++ b/changelogs/fragments/68251-redfish_config-fix-boolean-bios-attr-support.yaml @@ -0,0 +1,3 @@ +--- +bugfixes: +- redfish_config - fix support for boolean bios attrs (https://github.com/ansible/ansible/pull/68251) diff --git a/lib/ansible/modules/remote_management/redfish/redfish_config.py b/lib/ansible/modules/remote_management/redfish/redfish_config.py index 44c09ca38fd..f00882ae332 100644 --- a/lib/ansible/modules/remote_management/redfish/redfish_config.py +++ b/lib/ansible/modules/remote_management/redfish/redfish_config.py @@ -60,7 +60,7 @@ options: description: - value of BIOS attribute to update default: 'null' - type: str + type: raw version_added: "2.8" timeout: description: @@ -142,7 +142,7 @@ def main(): username=dict(required=True), password=dict(required=True, no_log=True), bios_attribute_name=dict(default='null'), - bios_attribute_value=dict(default='null'), + bios_attribute_value=dict(default='null', type='raw'), timeout=dict(type='int', default=10) ), supports_check_mode=False