This artcile will walk through the installing and configuring Ansicolor plugin in Jenkins to make colorized output in ansible playbook stdout. Jenkins console is very plain and simple. If you are using Jenkins to run the ansible playbook, you might notice that colorful output might be missing. Ansible Tower/AWX offers the colorful stdout in the consoles. We could turn Jenkins too post the similar output when you install AnsiColor plugin. This would turn Jenkins to bring the most familiar playbook color codes. (Green – OK, Orange for – Changed, Red for Std Error ).
By default, we would get output like the following snap.
Clik here to view.

Installing ANSI Color Plugin:
1. Login to Jenkins with admin privileges.
2. Navigate to Manage Jenkins.
Clik here to view.

3. Click on “Manage Plugins”.
Clik here to view.

4. Search for “AnsiColor” and select the plugin. Click on “Install without Restart”.
Clik here to view.

Configure ANSI Color Plugin in Job:
5. Navigate to Jenkins job which is integrated with Ansible playbook plugin.
Clik here to view.

6. Navigate to Build environment and check “Color ANSI Color Output”.
Clik here to view.

7. Click on Build and click on the “Advanced ” tab from “Invoke Ansible Playbook” plugin.
Clik here to view.

8. Select colorized stdout. Save the job.
Clik here to view.

Validate our work:
9. It’s time for testing. Execute “Build” and check for console output.
Clik here to view.

We have successfully installed and configured the ANSI Color plugin on Jenkins. We have got the beautiful colorized Ansible playbook output similar to AWX/ Ansible Tower.
The post Jenkins Console – Xterm Terminal – Colorized Ansible playbook Output appeared first on UnixArena.