I am able to define a hash(dict) like below in group_vars/all:
region_subnet_matrix:
site1:
region: "{{ aws_region }}"
subnet: "subnet-xxxxxxx"
zone: "{{aws_region}}a"
site2:
region: "{{ aws_region }}"
subnet: "subnet-xxxxxxx"
zone: "{{aws_region}}b"
but for the life of me, I could not figure out how to define it under hosts file
[all:vars]
region_subnet_matrix="{
site1:
region: "{{ aws_region }}"
subnet: "subnet-xxxxxxx"
zone: "{{aws_region}}a"
site2:
region: "{{ aws_region }}"
subnet: "subnet-xxxxxxx"
zone: "{{aws_region}}b"
}"
I know it was incorrect, but I don't know the right way. Can someone enlighten me, please?
Expected key=value host variable assignment
. – Potpourri