Issue 1:
When a list of hashes are used as variables, ansible-playbook output is very verbose, printing out the full hash contents. My working playbooks have longer variable files, so the terminal is constantly filled with useless information.

Also, when used with debug, the output is full item results are printed to stdout. I'd like to have very short output of tasks using 'debug: var=' for administrators to easily see output of tasks (ie process_status=running/stopped, deployed software versions).

---

- hosts: localhost
vars:
myapp:
- name: app1
somesetting: nope
othersetting: yep
dontyouhatepants: yep
- name: app2
somesetting: yep
othersetting: yep
dontyouhatepants: nope
tasks:
- name: just an echo
shell: /bin/echo "{{ item.name }}"
with_items: myapp
register: echo
- debug: var=item.stdout
with_items: echo.results

$ ansible-playbook -i inv/TEST test.yml

PLAY [localhost] **************************************************************

GATHERING FACTS ***************************************************************
ok: [localhost]

TASK: [just an echo] **********************************************************
changed: [localhost] => (item={'dontyouhatepants': 'yep', 'name': 'app1', 'othersetting': 'yep', 'somesetting': 'nope'})
changed: [localhost] => (item={'dontyouhatepants': 'nope', 'name': 'app2', 'othersetting': 'yep', 'somesetting': 'yep'})

TASK: [debug var=item.stdout] *************************************************
ok: [localhost] => (item={'item': {'dontyouhatepants': 'yep', 'name': 'app1', 'othersetting': 'yep', 'somesetting': 'nope'}, u'delta': u'0:00:00.002124', u'cmd': u'/bin/echo "app1" ', u'end': u'2014-01-09 16:41:02.251091', u'stderr': u'', u'stdout': u'app1', 'invocation': {'module_name': 'shell', 'module_args': u'/bin/echo "app1"'}, u'changed': True, u'rc': 0, u'start': u'2014-01-09 16:41:02.248967'}) => {
"item": {
"changed": true,
"cmd": "/bin/echo \"app1\" ",
"delta": "0:00:00.002124",
"end": "2014-01-09 16:41:02.251091",
"invocation": {
"module_args": "/bin/echo \"app1\"",
"module_name": "shell"
},
"item": {
"dontyouhatepants": "yep",
"name": "app1",
"othersetting": "yep",
"somesetting": "nope"
},
"rc": 0,
"start": "2014-01-09 16:41:02.248967",
"stderr": "",
"stdout": "app1"
},
"item.stdout": "app1"
}
ok: [localhost] => (item={'item': {'dontyouhatepants': 'nope', 'name': 'app2', 'othersetting': 'yep', 'somesetting': 'yep'}, u'delta': u'0:00:00.002419', u'cmd': u'/bin/echo "app2" ', u'end': u'2014-01-09 16:41:02.308687', u'stderr': u'', u'stdout': u'app2', 'invocation': {'module_name': 'shell', 'module_args': u'/bin/echo "app2"'}, u'changed': True, u'rc': 0, u'start': u'2014-01-09 16:41:02.306268'}) => {
"item": {
"changed": true,
"cmd": "/bin/echo \"app2\" ",
"delta": "0:00:00.002419",
"end": "2014-01-09 16:41:02.308687",
"invocation": {
"module_args": "/bin/echo \"app2\"",
"module_name": "shell"
},
"item": {
"dontyouhatepants": "nope",
"name": "app2",
"othersetting": "yep",
"somesetting": "yep"
},
"rc": 0,
"start": "2014-01-09 16:41:02.306268",
"stderr": "",
"stdout": "app2"
},
"item.stdout": "app2"
}

PLAY RECAP ********************************************************************
localhost : ok=3 changed=1 unreachable=0 failed=0

Issue 2:
I currently have a single dynamic inventory for EC2 which lists hosts across several VPCs, inside those VPCs the hosts are assigned different roles which are mapped to ansible groups.

However the group_vars folder support only one level, so if I have the same role present in 2 VPCs, I cannot assign different variables to hosts with the same role in different VPCs.

I would like to have a structure like that:

.
|-- ec2.py
`-- group_vars
|-- management
| |-- all
| |-- bastion
| |-- elasticsearch
| `-- logstash
|-- production
| |-- all
| |-- elasticsearch
| `-- web
`-- staging
|-- all
|-- elasticsearch
`-- web

Where I would have:

3 groups for the VPCs. i.e. management, production, staging.

each of the VPC groups would have several groups. i.e. elasticsearch, web.

To allow several roles with the same names in different VPCs, they could be prefixed by their parent name in the inventory.

production would have the following children production-elasticsearch, production-web.

This subject has already be discussed in #12156, but the ticket was closed saying it's possible to do it using a combination of inventory scripts and/or group_vars and host_vars or by implementing something like this as a plugin.

It's not possible to implement it with a combination of inventory scripts and/or group_vars and host_vars in the current state.

And while a vars plugin seems the most adapted way if you need a workaround, it involves copying most of the code already present in ansible.

Should I re-implement _get_hostgroup_vars in a plugin, or is there a better solution?