Cleaning old hosts from AAP


Using Ansible Automation Platform is very handy to run Ansible playbooks in an orderly way. Ans Red Hat even offers a developer license so that it’s possible to test all features of AAP.

But one problem that I ran into, is that I often throw away machines and start from scratch again. As the developer license allows for 16 machines, I thought I was on the save side, as I have a maximum of 4, maybe 5 machines I use for testing.

But that thought turned out to be wrong, as AAP counts the number of machines you have automated against, and that number never decreases. Automatically that means that I, eventually, run out of license.

Through the API it’s possible to remove hosts that haven’t been automated against, to clean up things. That’s quite the hassle.

So, I created a small Python script (clean_aap) that can clean the old, stale hosts for you.

Enjoy!

sysadm 

See also