callback plugins exist in ansible for this purpose and there is the '--tree' flag to ad-hoc /usr/bin/ansible mode.
However, we're not really trying to be a system that emits arbitrary JSON as many playbooks will include results for multiple systems and this would get very very large and unwieldy. On Mon, Jul 14, 2014 at 11:37 AM, Stuart Reynolds <[email protected] > wrote: > Re:(1) I've found that I can do this: > - hosts: localhost > - name: Describe instances > hosts: localhost > gather_facts: false # Prevents immediately logging in to hosts > tasks: > - command: aws ec2 describe-instances > register: result > - debug: var=result.stdout|from_json > However, really what I want to do is: > > - hosts: localhost > - name: Describe instance > hosts: localhost > gather_facts: *false* # Prevents immediately logging in to host > tasks: > - command: aws ec2 describe-instances > register: x=from_json(result.stdout) > - debug: var=x > Possible? > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/448b7e2e-ebec-4b1e-9100-61bc8fd060bd%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/448b7e2e-ebec-4b1e-9100-61bc8fd060bd%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgzz8-7smB8CZWv7HtCFzk16CFq9vavcF-3vZ1EHMurepA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
