3 ms·
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 saver
by usrme 5y ago
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-debugging/ 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").
- Hackbraten 5y agoThanks, 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
- HeadlessChild 5y agoOne 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 https://github.com/ansible/proposals/issues/35 [2] https://docs.ansible.com/ansible/2.4/intro_configuration.html#configuration-file https://docs.ansible.com/ansible/2.4/intro_configuration.htm... [3] https://gitlab.com/-/snippets/1851171 https://gitlab.com/-/snippets/1851171
- srvg 5y agofwiw, I myself only found out about that trick sone months ago...