Problem: The Fedora Infrastructure CMDB doesn't really exist in a single place - we have some information like MAC addresses, IPs etc in Ansible, others in Red Hat internal spreadsheets, and more in other places. This causes issues:
In short, this isn't really fit for purpose. We should do something better.
What's in the internal spreadsheet? Reordering by "type of data", you might group it like this:
How could we track / use this better?
Let's use Ansible as the CMDB-ish thing that stores all this. What might that look like?
Security is question one, but in conversation with managers, the current thinking is "no, it's not". The only things I think might be worth thinking about are serial & purchase info / warranty info, and I can't see how you make a scam out of that.
Second, part of the goal here is to make the data more actionable, especially warranties. I can see several routes here - Having the data in Ansible means we can populate the Zabbix inventory with the data - That makes it possible to run search queries in the UI (eg, Dell R650 hosts) - It also means we can perhaps build triggers to send alerts when warranties are due to expire, and other similar things - Reporting is also possible, either from the Zabbix UI again (it can build reports), or by running some script over the Ansible inventory directly - This would be compatible with CentOS too, since that is also Ansible and Zabbix based infra.
Do we have any alternatives? - We could use a new sheet, but that largely risks repeating the mistakes of the past, is internal, etc - We could build something out of the facts_cache, but that seems more brittle than using the inventory, especially as we'd still have to deploy some custom facts for non-discoverable things like purchase dates - We could put it all in the Ansible-private repo, but that means it can't go in Zabbix (since thats open to all)
As it stands now, the two infras (Fedora & CentOS) have different structures in their inventory for how to track this stuff. Rather than "pick a winner", I feel it's fairer to change both :grinning:
More seriously, I do think it would make sense to have this under a single key, eg:
hardware: serial: ABCDEF123 purchase_date: 2025-09-01 warranty_duration: 1095 # 3 years in days warranty_start: 2025-09-05 warranty_type: next-day
Having it all under {{ hardware.* }} makes it easy to know where to look for things, and stops it getting distributed all over the host_vars file (which is definitely an issue for some of the hosts with lots of vars). We could start with things not currently tracked, such as warranty data, and can then look at migrating existing vars (eg, mac0-3, bmc, etc) to this key later on.
{{ hardware.* }}
For the Zabbix side, we can definitely do this via Ansible, as https://www.zabbix.com/documentation/current/en/manual/api/reference/host/object#host-inventory is the possible list of inventory keys, and https://docs.ansible.com/ansible/latest/collections/community/zabbix/zabbix_host_module.html#id4 has examples of sending those keys
This is very much the high-level epic. I think we'll need to break this down into action items, including, but not limited to: - initial addition of the "hardware" key to the existing host_vars - migration of existing keys to the hardware key (and resulting code changes elsewhere - setting up population of the Zabbix inventory - designing triggers in Zabbix to warn on harware items (eg expiring warranty) - desgining reporting systems on the hadrware info (via Zabbix or CLI scripts)
This looks great to me. I'm happy to help work on it too.
I think additionally we could nuke the inventory/hardware file because we can determine it via the existance of a hardware: key or not.
The serial is already in facts, but I guess duplicating it makes it easier to work with as a variable.
Metadata Update from @phsmoura: - Issue priority set to: Waiting on Assignee (was: Needs Review) - Issue tagged with: medium-gain, medium-trouble, ops
Metadata Update from @gwmngilfen: - Issue tagged with: backlog
This issue has been migrated to Fedora Forge: https://forge.fedoraproject.org/infra/tickets/issues/12817
Please continue any further discussion there.
Metadata Update from @ryanlerch: - Issue close_status updated to: Migrated to Fedora Forge - Issue status updated to: Closed (was: Open)