Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible colours not printed #186

Closed
yosefy opened this issue Feb 26, 2019 · 4 comments
Closed

ansible colours not printed #186

yosefy opened this issue Feb 26, 2019 · 4 comments
Milestone

Comments

@yosefy
Copy link

yosefy commented Feb 26, 2019

the log is like this:

so
[0;32m is not changing anything
though
[1;32m prints bold green

so i am bit lost here

PLAY [all] *********************************************************************
Tuesday 26 February 2019  16:08:55 +0000 (0:00:00.257)       0:00:00.257 ****** 

TASK [Gathering Facts gather_subset=all, gather_timeout=20, _ansible_check_mode=False, _ansible_no_log=False, _ansible_debug=False, _ansible_diff=False, _ansible_verbosity=0, _ansible_version=2.7.7, _ansible_module_name=setup, _ansible_syslog_facility=LOG_USER, _ansible_selinux_special_fs=['fuse', 'nfs', 'vboxsf', 'ramfs', '9p'], _ansible_socket=None, _ansible_shell_executable=/bin/sh, _ansible_keep_remote_files=False, _ansible_tmpdir=None, _ansible_remote_tmp=~/.ansible/tmp] ***
�[0;32mok: [ansitest.pipl.com]�[0m
Tuesday 26 February 2019  16:08:59 +0000 (0:00:03.532)       0:00:03.789 ****** 

TASK [Ping _ansible_check_mode=False, _ansible_no_log=False, _ansible_debug=False, _ansible_diff=False, _ansible_verbosity=0, _ansible_version=2.7.7, _ansible_module_name=ping, _ansible_syslog_facility=LOG_USER, _ansible_selinux_special_fs=['fuse', 'nfs', 'vboxsf', 'ramfs', '9p'], _ansible_socket=None, _ansible_shell_executable=/bin/sh, _ansible_keep_remote_files=False, _ansible_tmpdir=None, _ansible_remote_tmp=~/.ansible/tmp] ***
�[0;32mok: [ansitest.pipl.com]�[0m

PLAY RECAP *********************************************************************
�[0;32mansitest.pipl.com�[0m          : �[0;32mok=2   �[0m changed=0    unreachable=0    failed=0   

Tuesday 26 February 2019  16:08:59 +0000 (0:00:00.245)       0:00:04.035 ****** 
=============================================================================== 
Gathering Facts --------------------------------------------------------- 3.53s
Ping -------------------------------------------------------------------- 0.25s
Playbook run took 0 days, 0 hours, 0 minutes, 3 seconds```


@bugy
Copy link
Owner

bugy commented Feb 26, 2019

The problem was with 0 code (set graphics to normal). I ignored any other codes, if there was a zero (in all the examples I saw, [0m and [31m were used separately)

@yosefy
Copy link
Author

yosefy commented Feb 26, 2019 via email

@yosefy
Copy link
Author

yosefy commented Feb 27, 2019

work like a charm
thanks :)

@bugy bugy closed this as completed Mar 20, 2019
@yosefy
Copy link
Author

yosefy commented Nov 17, 2023

in case someone needs it too

[defaults]
force_color = true

in ansible.cfg
to show playbook colors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants