Closed tbaker1313 closed 1 month ago
Reference links : https://github.com/HewlettPackard/ilo-ansible-collection https://docs.ansible.com/ansible/latest/collections/community/general/hpilo_info_module.html
The REST Redfish API should be enabled
https://www.hpe.com/ca/en/servers/restful-api.html
pseudo code is like
name: ilo login hosts:
vars:
ilo_ip:
ilo_username:
ilo_pass:
ilo_logurl:"
tasks:
-name: retrive logins
uri:
url:"https://{{ilo_ip}}{{ilo_logurl}}"
there is more code for sure will have to look into it
register: ilologresponse
then use debug and var ilologresponse
use selectattr to filter what you need
make a loop and display those log events
To disable the Virtual nic, more info is found in this HPE forum https://community.hpe.com/t5/server-management-remote-server/disable-ilo-virtual-nic/td-p/7087994 I'll be something like this:
PATCH /redfish/v1/Managers/{managerId}/
{
"Oem": {
"Hpe": {
"VirtualNICEnabled": false
}
}
}
For ansible, this ends up looking similar to this:
name: Turn off the virtual NIC if necessary
uri:
url: 'https://{{ uri }}/redfish/v1/Managers/1/'
method: PATCH
body:
Oem:
Hpe:
VirtualNICEnabled: false
body_format: json
headers:
Content-Type: application/json
register: result
Ran some tests, discovered that depending on the Instance environment, different servers are either available or not. Was able to determine that it was possible to check the logins (particularly for the DELL servers, HPE was somewhat inconclusive.) We really need another test on a Gen 10 which will be accomplished the week of September 23rd.
Completed, tested and AAP template updated to use the master branch.
Describe the issue Create and document an Ansible Automation Platform play that checks the ILO/iDRAC logins and virtual nics.
Proposed checks
How does this benefit the users of our platform?
Definition of done