Cleaning up unused Content View versions in Satellite 6

The problem

When using the whole concept of Content Views in Satellite 6 the way it is intended, you can end up with a lot of unused versions; every time a new version is promoted to all your environment, you end up with an unused one. When using a lot of content views and especially when using Composite Content Views that end up with a new version every time one of their components get updated, you end up spending a lot of time removing the via the gui.

The solution (well, a solution anyway)

While you can clean them up using hammer in a loop, you need to make sure you only remove versions that are not currently used by environments. Since I already made a python library for various tasks, it was trivial to add a small script that removes every version of a content view that is not in use. We use this at my current client and it saves a lot of time, maybe someone else can find a use case for it too:)

You can find it at https://github.com/yhekma/satellite6_tools (the one called cleanout_view.py)

Comments

Popular posts from this blog

Runing Saltstack in multi-master

Recursively update Composite Content Views in Satellite 6/Katello

First!