From 15e961c2ef0d53afdd761b034b28b96d49649cbe Mon Sep 17 00:00:00 2001 From: Jacob Date: Thu, 16 Apr 2020 02:56:24 -0400 Subject: [PATCH] redfish_config: fix support for boolean BIOS attributes (#189) 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 +++ plugins/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 0000000000..20ba44073a --- /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/plugins/modules/remote_management/redfish/redfish_config.py b/plugins/modules/remote_management/redfish/redfish_config.py index 82abceafeb..81f9f132ef 100644 --- a/plugins/modules/remote_management/redfish/redfish_config.py +++ b/plugins/modules/remote_management/redfish/redfish_config.py @@ -57,7 +57,7 @@ options: description: - value of BIOS attr to update (deprecated - use bios_attributes instead) default: 'null' - type: str + type: raw bios_attributes: required: false description: @@ -230,7 +230,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'), bios_attributes=dict(type='dict', default={}), timeout=dict(type='int', default=10), boot_order=dict(type='list', elements='str', default=[]),