Satellite API - Pt 2. Ansible Roles
Background
When the nightly sync of our satellite repos fails, many times it is due to service states not being active (running). Before another sync is attempted, the state of these services should be checked, and if need be, restart the given services. As satellite has a REST endpoint for running Ansible roles, we could report the status, and restart if needed, the services required for a sync to run.
DoD
-
Create Ansible roles to report on the status of the required services -
Restart services if they have failed -
Validate that the role(s) can be run via the REST API
AC
-
Role can be called via GitLab pipeline -
If role fails, fail pipeline accordingly