@ -34,34 +34,39 @@ options:
required : true
description :
- Base URI of OOB controller
user :
user name :
required : true
description :
- User for authentication with OOB controller
version_added : " 2.8 "
password :
required : true
description :
- Password for authentication with OOB controller
bios_attr _name:
bios_attr ibute _name:
required : false
description :
- name of BIOS attribute to update
default : ' null '
bios_attr_value :
version_added : " 2.8 "
bios_attribute_value :
required : false
description :
- value of BIOS attribute to update
default : ' null '
mgr_attr_name :
version_added : " 2.8 "
manager_attribute_name :
required : false
description :
- name of Manager attribute to update
default : ' null '
mgr_attr_value :
version_added : " 2.8 "
manager_attribute_value :
required : false
description :
- value of Manager attribute to update
default : ' null '
version_added : " 2.8 "
author : " Jose Delarosa (@jose-delarosa) "
'''
@ -71,30 +76,30 @@ EXAMPLES = '''
redfish_config :
category : Systems
command : SetBiosAttributes
bios_attr _name: BootMode
bios_attr _value: Uefi
bios_attr ibute _name: BootMode
bios_attr ibute _value: Uefi
baseuri : " {{ baseuri }} "
user : " {{ user }}"
user name : " {{ user name }}"
password : " {{ password }} "
- name : Set BootMode to Legacy BIOS
redfish_config :
category : Systems
command : SetBiosAttributes
bios_attr _name: BootMode
bios_attr _value: Bios
bios_attr ibute _name: BootMode
bios_attr ibute _value: Bios
baseuri : " {{ baseuri }} "
user : " {{ user }}"
user name : " {{ user name }}"
password : " {{ password }} "
- name : Enable PXE Boot for NIC1
redfish_config :
category : Systems
command : SetBiosAttributes
bios_attr _name: PxeDev1EnDis
bios_attr _value: Enabled
bios_attr ibute _name: PxeDev1EnDis
bios_attr ibute _value: Enabled
baseuri : " {{ baseuri }} "
user : " {{ user }}"
user name : " {{ user name }}"
password : " {{ password }} "
- name : Set BIOS default settings
@ -102,37 +107,37 @@ EXAMPLES = '''
category : Systems
command : SetBiosDefaultSettings
baseuri : " {{ baseuri }} "
user : " {{ user }}"
user name : " {{ user name }}"
password : " {{ password }} "
- name : Enable NTP in the OOB Controller
redfish_config :
category : Manager
command : SetManagerAttributes
m gr_attr_name: NTPConfigGroup .1 . NTPEnable
m gr_attr_value: Enabled
m ana ge r_attribute _name: NTPConfigGroup .1 . NTPEnable
m ana ge r_attribute _value: Enabled
baseuri : " {{ baseuri }} "
user : " {{ user }}"
user name : " {{ user name }}"
password : " {{ password }} "
- name : Set NTP server 1 to { { ntpserver1 } } in the OOB Controller
redfish_config :
category : Manager
command : SetManagerAttributes
m gr_attr_name: NTPConfigGroup .1 . NTP1
m gr_attr_value: " {{ ntpserver1 }} "
m ana ge r_attribute _name: NTPConfigGroup .1 . NTP1
m ana ge r_attribute _value: " {{ ntpserver1 }} "
baseuri : " {{ baseuri }} "
user : " {{ user }}"
user name : " {{ user name }}"
password : " {{ password }} "
- name : Set Timezone to { { timezone } } in the OOB Controller
redfish_config :
category : Manager
command : SetManagerAttributes
m gr_attr_name: Time .1 . Timezone
m gr_attr_value: " {{ timezone }} "
m ana ge r_attribute _name: Time .1 . Timezone
m ana ge r_attribute _value: " {{ timezone }} "
baseuri : " {{ baseuri }} "
user : " {{ user }}"
user name : " {{ user name }}"
password : " {{ password }} "
'''
@ -163,12 +168,12 @@ def main():
category = dict ( required = True ) ,
command = dict ( required = True , type = ' list ' ) ,
baseuri = dict ( required = True ) ,
user = dict ( required = True ) ,
user name = dict ( required = True ) ,
password = dict ( required = True , no_log = True ) ,
m gr_attr_name= dict ( default = ' null ' ) ,
m gr_attr_value= dict ( default = ' null ' ) ,
bios_attr _name= dict ( default = ' null ' ) ,
bios_attr _value= dict ( default = ' null ' ) ,
m ana ge r_attribute _name= dict ( default = ' null ' ) ,
m ana ge r_attribute _value= dict ( default = ' null ' ) ,
bios_attr ibute _name= dict ( default = ' null ' ) ,
bios_attr ibute _value= dict ( default = ' null ' ) ,
) ,
supports_check_mode = False
)
@ -177,15 +182,15 @@ def main():
command_list = module . params [ ' command ' ]
# admin credentials used for authentication
creds = { ' user ' : module . params [ ' user ' ] ,
creds = { ' user ' : module . params [ ' user name ' ] ,
' pswd ' : module . params [ ' password ' ] }
# Manager attributes to update
mgr_attributes = { ' mgr_attr_name ' : module . params [ ' m gr_attr_name' ] ,
' mgr_attr_value ' : module . params [ ' m gr_attr_value' ] }
mgr_attributes = { ' mgr_attr_name ' : module . params [ ' m ana ge r_attribute _name' ] ,
' mgr_attr_value ' : module . params [ ' m ana ge r_attribute _value' ] }
# BIOS attributes to update
bios_attributes = { ' bios_attr_name ' : module . params [ ' bios_attr _name' ] ,
' bios_attr_value ' : module . params [ ' bios_attr _value' ] }
bios_attributes = { ' bios_attr_name ' : module . params [ ' bios_attr ibute _name' ] ,
' bios_attr_value ' : module . params [ ' bios_attr ibute _value' ] }
# Build root URI
root_uri = " https:// " + module . params [ ' baseuri ' ]