Re:Ansible Techniques I Wish I’d Known Earlier
by usrme on Friday August 27, 2021 @04:52PM
(#28332850)
It's a damn shame it took until this article for me (and it appears some others) to learn about the console and the debugger; those seem like massive time savers! My own biggest helper has been to use "ANSIBLE_STDOUT_CALLBACK=yaml" wherever "ansible-playbook" is called (https://jpmens.net/2021/03/12/alter-ansible-s-output-on-debu...). It makes the verbose output much more readable and is especially handy for tasks that can spew thousands of lines at ones (e.g. "apt update/upgrade").
[ Parent
| on HN ]
Re:Ansible Techniques I Wish I’d Known Earlier
by Hackbraten on Saturday August 28, 2021 @09:02AM
(#28337689)
Thanks, that setting helps a lot!
Whoever prefers configuration files over environment variables can get the same effect by adding to their ~/.ansible.cfg:
[defaults]
stdout_callback = yaml
Re:Ansible Techniques I Wish I’d Known Earlier
by HeadlessChild on Sunday August 29, 2021 @05:32AM
(#28345394)
One needs to lookout for their config file being overwritten [1] if another ansible.cfg exist. In my case my ~/.ansible.cfg config got overwritten by a local ./ansible.cfg (as per the order the config files are read [2]) in a project directory.
In my case I workaround it by _merging_ all potential config files into one at runtime using `crudini` as demonstrated by rsguhr [3].
[1] https://github.com/ansible/proposals/issues/35
[2] https://docs.ansible.com/ansible/2.4/intro_configuration.htm...