[ansible-project] Grouping subelements

2021-10-25 Thread Anil Kommareddy
Hi All, How do I group sublement port under portnames? - name: Test flatten - 1 debug: msg: "{{ item[1].port | join(',') }}" with_subelements: - "{{ new_host_groups }}" - portnames json file --- { "name": "sda", "portnames": [ { "nickname": "sdap1", "port":

[ansible-project] Variables containing -

2021-10-16 Thread Anil Kommareddy
Hi All, I am retrieving data from storage array. The results are in json format. These results contain variables with "-" i.e. minus symbol in their names. When I try to access data in those variables, I get an error "Make sure your variable name does not contain invalid characters like