I'm trying to generate a list of all the packages installed per server without having to go through each using
rpm. I'm thinking Satellite should be able to provide this in a decent (hopefully easily parsed) format.
Short answer: yes.
Longer answer: you'll need to look in to to the Satellite API. The documentation available with Satellite is good for a very basic query, but you'll quickly get in to queries that (IMHO) aren't as well documented. At a high level, what you'll end up doing is querying Satellite for a list of all registered systems, then using that list to issue queries for all installed packages on each system. Ultimately, this will only be valid as of the last time each system updated its package profile on the Satellite, but it'll be more central than trolling each individual system via an RPM query.
Here's the code I use (sanitized, of course) to list the systems registered to my Satellite:
#!/usr/bin/python import xmlrpclib SAT_URL = "https://<satellite hostname>/rpc/api" SAT_USER = "<satellite user name>" SAT_PASS = "<password for above login id>" client = xmlrpclib.Server(SAT_URL, verbose=0) key = client.auth.login(SAT_USER, SAT_PASS) syslist = client.system.listSystems(key)
for sys in syslist: print "%s registered with Satellite" % (sys['name'],)
Here's a final script which extends John's answer to provide a full solution.