DEV Community

schnipdip
schnipdip

Posted on • Updated on

Automating debug removal for Ansible YAML code with Bugspray

Alt Text
Backstory: I wanted to learn more about the philosophy behind debug in production and development. I am not a programmer by nature, so understanding the implementation of debug was a foreign concept to me. I researched and researched on best practices for implementing debug into production. The answer I got - "it depends". There is no one way to properly implement debug. It comes down to what your enterprise requirements are. Some programmers leave in non-intrusive and non-sensitive debug in production code. Some programmers believe all debug should be removed from production.

I designed a small application to fulfill the needs of having to mass remove or selectively locate useful debugs.

The program I came up with is called Bugspray.

https://github.com/schnipdip/Bugspray

Bugspray allows you to automate the mass removal of debug code from YAML files or you can selectively keep debug within your code. This reduces the amount of time needed to refactor your code when moving from dev to ops. It fits nicely within the devops pipeline.

So whatever your enterprise requirements, Bugspray can help!

Oldest comments (0)