Greets ansible,
I'm interested in the development of a way to extract specific pieces of data when doing a
"register:" directive on a command. I seem to have a lot of ${foo.stdout} code littered
around, which first, is really problematic because I can not interchangably use either a
register:'ered variable or a plain-old-variable unless I mock out my plain-old-variable as a
dictionary with a stdout property (vars:\ myfoo:\ stdout: myvalue).
That is my specific problem at the moment. I can imagine a register expression as one
particular answer to this problem:
- shell: echo hi ansible-project
register: expression=$registrant.stdout myhello
Here, the register directive gets an expression argument which Read-Evaluates-Replaces the
original thing it got in, transforming a complex shell-results object with a string, it's
stdout.
Finding a way to munge together the right variables has been the #1 thing that's still work
on my part in Ansible. Most everything else seems to come already working.
(This was initially files as issue #1730, https://github.com/ansible/ansible/issues/1730,
'"register" expressions' and moved here per request of Mr DeHann.)
Cheers all!
- @rektide