I have an ansible playbook that is called from a bash script as show in the below snippet ?
#!/bin/bash
# Name of script: execute_ansible
# Some pre-processing
.....
#
# Execute ansible playbook
ansible-playbook my_ansible_playbook
This script is executed as below:
$ bash execute_ansible
When executed with the above command, the ansible playbook my_ansible_playbook is executed correctly. However, the colorized output that would have been displayed had the the ansible playbook been run from the command line directly is not visible. Is there a way we can enable the colorized output to be visible when executed from the shell script ?