ansible_logo Hi all ! Long time since last blog post ! I’m using Jenkins with Ansible on my Nousmotards project for building docker containers or deploying into production.

You may noticed that you’ve no Ansible color when running it into Jenkins! The simple way to correct it is to export an environment variable in your Jenkins job:

export ANSIBLE_FORCE_COLOR=true

Now that’s pretty cool! However, you may also noticed that there’s some kind of lags on the console when you want to see a real time console log on Jenkins. That’s pretty annoying when you’re doing rolling upgrades or restart. The solution is once again an environment variable:

export PYTHONUNBUFFERED=1

That’s nice now, like on a shell display!