Physical servers prechecks playbook

91 views
Skip to first unread message

Linux Study

unread,
Nov 14, 2022, 1:20:15 PM11/14/22
to ansible...@googlegroups.com
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

Dick Visser

unread,
Nov 15, 2022, 1:01:00 AM11/15/22
to ansible...@googlegroups.com
What do you mean with pre-checks?
Ansible is an automation tool, so how do you currently get those pre-checks?


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAEcjLFzfXs5FnsWyMr1cLmXAeG8_RQ0s5yQyHMzy1hzGdu_sRQ%40mail.gmail.com.
--
Sent from Gmail Mobile

Rowe, Walter P. (Fed)

unread,
Nov 15, 2022, 7:26:05 AM11/15/22
to ansible...@googlegroups.com
Ansible needs to have SSH access to the Linux machine with an ID that can sudo to root.

Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123

Linux Study

unread,
Nov 16, 2022, 12:38:41 PM11/16/22
to ansible...@googlegroups.com
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




Klaas Demter

unread,
Nov 16, 2022, 2:26:44 PM11/16/22
to ansible...@googlegroups.com

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.

Will McDonald

unread,
Nov 16, 2022, 3:15:50 PM11/16/22
to ansible...@googlegroups.com
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.




Linux Study

unread,
Nov 18, 2022, 3:35:26 AM11/18/22
to ansible...@googlegroups.com
Is anybody having sample playbook for it?


Regards,
Abhi

Reply all
Reply to author
Forward
0 new messages