summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Yundt <jyundt@gmail.com>2020-04-16 15:03:13 -0400
committerMatt Clay <matt@mystile.com>2020-05-05 19:33:37 -0700
commite5d93a4f111f4cd6d8a92314427e247502bc6ed9 (patch)
tree79b7c274f6152dae484bc24c371845612ae06299
parent604f797f0ecdc3d34ae031b971f61b2d7bc4e0b2 (diff)
downloadansible-e5d93a4f111f4cd6d8a92314427e247502bc6ed9.tar.gz
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
-rw-r--r--changelogs/fragments/68251-redfish_config-fix-boolean-bios-attr-support.yaml3
-rw-r--r--lib/ansible/modules/remote_management/redfish/redfish_config.py4
2 files changed, 5 insertions, 2 deletions
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/lib/ansible/modules/remote_management/redfish/redfish_config.py b/lib/ansible/modules/remote_management/redfish/redfish_config.py
index 44c09ca38f..f00882ae33 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