3 ms·
Gotta try that console and debugger, those weren't even on my radar!
by linsomniac 5y ago
Gotta try that console and debugger, those weren't even on my radar!
- thibaut_barrere 5y agoThese are both great. I still have an issue with console for things requiring a sudo access, for some reason, but it is still very handy! Another trick I use routinely is this, to display a given variable across all hosts: ANSIBLE_STDOUT_CALLBACK=json poetry run ansible all -m debug -a var=vault_ssl_cert | jq ".plays[0].tasks[0].hosts"
- zwischenzug 5y agoNice, I might steal that for part II...
- mrweasel 5y agoMe neither, but they are certainly something I can use. I still lack something that will tell me where a variable is sourced from.
- kimbernator 5y agoUnfortunately, console appears to be effectively ignored by the developers and it's pretty obvious when you're in it. There's just a lot of things that you can't do. It's a shame, too, because ansible is particularly frustrating to write for me coming from chef where everything is written in pure ruby and the REPL is basically just IRB with some extra stuff. Having an interactive environment to see how the data I'm handling is being transformed would be helpful, but ansible-console just doesn't do what I need most of the time.