Satellite 6.7 - Run a remote job passing server names from a host collection

Posted on

Hi,

My scenario is this: We have a new patching team based offshore who we want to be as "hands off" as possible. Servers are currently grouped into patching groups, which have the potential to be updated from time to time. I've written a simple shell script on our Satellite 6.7 server to import a CSV file containing server name and patch group, and create Host Collections of the same (the script will also delete all the old host collections defined for patching beforehand) . This is tested and working.

My current issue now is that I'm writing a second script to make a call to our Opsview monitoring server and schedule downtime for all servers in a given host collection. So basically, it's a small menu that lists all current host collections, asks the user to pick one, then retrieves all the serves in that collection,and runs ssh to the Opsview server and schedules the downtime via a rest api.

My question is, is it possible, or how easy is it, to turn one or both of these scripts into jobs within Satellite, so the user doesn't have to run them from the OS?

The first script needs to run against the Satellite server itself, the second needs to run on the remote Opsview server but pass all the server names from the selected host collection so that the downtime command can be generated for each.

Hope I've explained myself well enough :)

Thanks

Mike.

Responses