Hi All,
Can someone please help me to get pre-checks from Lenovo physical servers via ansible-playbook? Someone has a sample playbook that can help me…
Regards,
Abhi
Hi All,
Can someone please help me to get pre-checks from Lenovo physical servers via ansible-playbook? Someone has a sample playbook that can help me…
Regards,
Abhi
What do you mean with pre-checks?
Ansible is an automation tool, so how do you currently get those pre-checks?
Ansible needs to have SSH access to the Linux machine with an ID that can sudo to root.
Walter
I mean . If there is lenovo or dell servers.how can we get details like bios version, mac address, firm version etc . Via ansible playbook?
Regards,
Abhi
For dell you can get these types of information from the idrac if it’s configured.
https://docs.ansible.com/ansible/latest/collections/dellemc/openmanage/index.html
the idrac* modules.
You get a useful subset of DMI info already parsed into facts by the setup module, for example running ansible -m setup localhost
could give you:
“ansible_bios_vendor”: “LENOVO”,
“ansible_bios_version”: “x.y.z”,
“ansible_board_asset_tag”: “Not Available”,
“ansible_board_name”: “xxxxxxxxxxxxxx”,
“ansible_board_serial”: “xxxxxxxxxxxxxx”,
“ansible_board_vendor”: “LENOVO”,
“ansible_board_version”: “Not Defined”,
“ansible_chassis_asset_tag”: “No Asset Information”,
“ansible_chassis_serial”: “xxxxxxxxxxxxxx”,
“ansible_chassis_vendor”: “LENOVO”,
“ansible_chassis_version”: “None”,
You could use a custom fact or two set based on dmidecode or the included setup facts to toggle the hardware vendor and then use their appropriate LOM tooling CLIs or any REST API interfaces provided if you needed to dig deeper. (As Klaas has mentioned Dell iDRAC, Lenovo LOM or CMM)
Look at what others have done in this space, for example https://newrelic.com/blog/best-practices/ansible-auditing-tool (or https://github.com/redhat-cop/canary, which was used for application fingerprinting but again could prove useful examples.)
Finally, the dmidecode binary directly will give you much of the info you’re looking for although it’s not going to be the easiest thing to parse.
Is anybody having sample playbook for it?
Regards,
Abhi