Add force_color = True
to your Defaults
section in /etc/foreman-proxy/ansible.cfg like this:
...
[defaults]
callback_whitelist = foreman, timer, profile_tasks, profile_roles, changes
diff_always = True
force_color = True
host_key_checking = False
local_tmp = /etc/ansible/tmp
retry_files_enabled = False
stdout_callback = yaml
vault_password_file = ~/.ansible_vault_password
...
This options forces color mode even when running without a TTY or the “nocolor” setting is True.