Is there a way in Ansible to replace a dictionary value based on k:v lookup to another dictionary?
问题 I have k:v dictionary of hostname: IP that I want to use in a lookup from another dictionary to replace entries matching key from 1st dictionary and replacing it with the corresponding value in 2nd dictionary; 1st: "nb_console_ip": { "office-con01": "10.20.30.100", 2nd: "nb_console_port": [ { "console": "office-con01", "hostname": "office-core01", "port": "con1" }, { "console": "office-con01", "hostname": "office-core02", "port": "con2" }, { "console": "office-con01", "hostname": "office-fw01