Hi Guys need some advice on this case
here's my hostvars
---
SERVICE:
MC:
GS_SIGMAX_MC_A_import:
PIM_GROUP: GS_SIGMAX_MC_A_PIM
GS_SIGMAY_MC_A_import:
PIM_GROUP: GS_SIGMAY_MC_A_PIM
i'd like to populate a list of "PIM_GROUP" values whatver the previous dict name is (xxx_import)
currently this task
- debug: msg="{{ item }}"
with_items:
- "{{
SERVICE.MC }}"
gives :
"item": {
"GS_SIGMAX_MC_A_import": {
"PIM_GROUP": "GS_SIGMAX_MC_A_PIM"
},
"GS_SIGMAY_MC_A_import": {
"PIM_GROUP": "GS_SIGMAY_MC_A_PIM"
}
},
"msg": {
"GS_SIGMAX_MC_A_import": {
"PIM_GROUP": "GS_SIGMAX_MC_A_PIM"
},
"GS_SIGMAY_MC_A_import": {
"PIM_GROUP": "GS_SIGMAY_MC_A_PIM"
}
}
do i need json_query for that or there's an easier way ?
thanks !
\\ François