3 ms·
I am a fan of SaltStack. With SaltStack approach, you don't have to write additional yaml to see the output of external command's execution. You see / don't see
by tryauuum 4y ago
I am a fan of SaltStack. With SaltStack approach, you don't have to write additional yaml to see the output of external command's execution.
You see / don't see the output of commands based on logging settings in your client (salt-call).
# EDIT: people pointed out that running ansible with additional -v's will indeed print commands. I don't understand how'd I missed that... I've certainly run ansible with -v a lot.
And my favorite part of SaltStack is that you can use jinja in any place of your states
- notabee 4y agoYou can use jinja expressions inline with your Ansible tasks' yaml if you want to as well. As for whether that's a good idea or a mess to read is in the eye of the beholder. Personally I do it only as a last resort, but it has been nice to have occasionally rather than some clunky multiple-task alternative.
- tryauuum 4y agoIt's not the same, you cannot put a jinja condition in an arbitrary place of your ansible yaml, even at the middle of any line (though it's indeed a questionable approach)
- opk 4y agoIf you need to see the output of commands and tasks in ansible, select a different output callback. Where I want something rudimentary, I use `ANSIBLE_STDOUT_CALLBACK=json` and a tool like github.com/okapia/ansible-json-monitor to parse the json.