)]}'
{"playbooks/common-tasks/dynamic-address-fact.yml":[{"author":{"_account_id":25600,"name":"Ebbex","display_name":"ebbex","email":"openstack@slipsprogrammor.no","username":"ebbex"},"change_message_id":"f7319009ede953eb70389fe78f1eed04e1867399","unresolved":true,"context_lines":[{"line_number":25,"context_line":"    query: \"{{ is_metal | ternary(metal_query, non_metal_query) }}\""},{"line_number":26,"context_line":"    non_metal_query: \"container_networks.{{ network_address }}.address || ansible_host\""},{"line_number":27,"context_line":"    find_bridge: \"container_networks.{{ network_address }}.bridge\""},{"line_number":28,"context_line":"    metal_query: \"\\\"ansible_facts[{{ hostvars[inventory_hostname] | json_query(find_bridge) | replace(\u0027-\u0027,\u0027_\u0027) }}]\\\".ipv4.address || {{ non_metal_query }}\""},{"line_number":29,"context_line":"  tags:"},{"line_number":30,"context_line":"    - common-address"},{"line_number":31,"context_line":"    - always"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"de81ddc6_c6045a5a","line":28,"range":{"start_line":28,"start_character":17,"end_line":28,"end_character":155},"updated":"2021-03-04 08:33:59.000000000","message":"ansible_facts[ hostvars[inventory_hostname] | json_query(find_bridge) | replace(\u0027-\u0027, \u0027_\u0027) ].ipv4.address or really\nansible_facts[ hostvars[inventory_hostname][\u0027container_networks\u0027][network_address][\u0027bridge\u0027] | replace(\u0027-\u0027, \u0027_\u0027\u0027) ][\u0027ipv4\u0027][\u0027address\u0027]\n\nWhat is the cost of a json_query?\n\nThis whole playbook seems silly.","commit_id":"2bc6f728ed2792363fdb826968808a6547bf5405"},{"author":{"_account_id":25023,"name":"Jonathan Rosser","email":"jonathan.rosser@rd.bbc.co.uk","username":"jrosser"},"change_message_id":"402e31e840af8be52222419cedcfd1f30131cf90","unresolved":true,"context_lines":[{"line_number":24,"context_line":"- name: Set IP to use for {{ network_address }}"},{"line_number":25,"context_line":"  set_fact: \"{{ network_address }}\u003d{{ is_metal | ternary(metal_address, container_address) }}\""},{"line_number":26,"context_line":"  vars:"},{"line_number":27,"context_line":"    metal_address: \"{{ ansible_facts[ hostvars[inventory_hostname][\u0027container_networks\u0027][network_address][\u0027bridge\u0027] | replace(\u0027-\u0027, \u0027_\u0027\u0027) ][\u0027ipv4\u0027][\u0027address\u0027] }}\""},{"line_number":28,"context_line":"    container_address: \"{{ hostvars[inventory_hostname][\u0027container_networks\u0027][network_address][\u0027address\u0027] | default(ansible_host) }}\""},{"line_number":29,"context_line":"  tags:"},{"line_number":30,"context_line":"    - common-address"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"a137a0ef_c53ae99d","line":27,"range":{"start_line":27,"start_character":134,"end_line":27,"end_character":135},"updated":"2021-03-04 12:46:49.000000000","message":"duplicate \u0027 ?\n\nIf you want to change this and remove json_query perhaps that should be a separate patch as I think there is a risk of breaking existing behaviour here.","commit_id":"73f93a6fcf6e8035aa7dd6adb9eea11cca5f3119"},{"author":{"_account_id":25600,"name":"Ebbex","display_name":"ebbex","email":"openstack@slipsprogrammor.no","username":"ebbex"},"change_message_id":"a3e159a98aff4a3f8150f2d39389c1a156e7e29e","unresolved":true,"context_lines":[{"line_number":27,"context_line":"    query: \"{{ is_metal | ternary(metal_query, non_metal_query) }}\""},{"line_number":28,"context_line":"    non_metal_query: \"container_networks.{{ network_address }}.address || ansible_host\""},{"line_number":29,"context_line":"    find_bridge: \"container_networks.{{ network_address }}.bridge\""},{"line_number":30,"context_line":"    metal_query: \"\\\"ansible_facts[{{ hostvars[inventory_hostname] | json_query(find_bridge) | replace(\u0027-\u0027,\u0027_\u0027) }}]\\\".ipv4.address || {{ non_metal_query }}\""},{"line_number":31,"context_line":"  tags:"},{"line_number":32,"context_line":"    - common-address"},{"line_number":33,"context_line":"    - always"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"4e0a7acb_8415e0bc","line":30,"range":{"start_line":30,"start_character":17,"end_line":30,"end_character":129},"updated":"2021-03-05 12:02:30.000000000","message":"So what are we ending up with here? (assuming \u0027network_address: container_address\u0027)\n\n{{ hostvars[inventory_hostname] | json_query(find_bridge) | replace(\u0027-\u0027,\u0027_\u0027) }} resolves down to br_mgmt\n\nSo now your metal_query becomes\n\nhostvars[inventory_hostname] | json_query(\"\\\"ansible_facts[br_mgmt]\\\".ipv4.address\")\n\nIf anything the metal_query should end up as \"ansible_facts.br_mgmt.ipv4.address\"","commit_id":"b8b6161ec2a5a5e95ed0c1e671d686f38840af07"},{"author":{"_account_id":25023,"name":"Jonathan Rosser","email":"jonathan.rosser@rd.bbc.co.uk","username":"jrosser"},"change_message_id":"6e70b136d2560cd917014ac291e178e2186d5123","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    query: \"{{ is_metal | ternary(metal_query, non_metal_query) }}\""},{"line_number":28,"context_line":"    non_metal_query: \"container_networks.{{ network_address }}.address || ansible_host\""},{"line_number":29,"context_line":"    find_bridge: \"container_networks.{{ network_address }}.bridge\""},{"line_number":30,"context_line":"    metal_query: \"\\\"ansible_facts[{{ hostvars[inventory_hostname] | json_query(find_bridge) | replace(\u0027-\u0027,\u0027_\u0027) }}]\\\".ipv4.address || {{ non_metal_query }}\""},{"line_number":31,"context_line":"  tags:"},{"line_number":32,"context_line":"    - common-address"},{"line_number":33,"context_line":"    - always"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"01ec8361_dde2c1f8","line":30,"range":{"start_line":30,"start_character":17,"end_line":30,"end_character":129},"in_reply_to":"4e0a7acb_8415e0bc","updated":"2021-03-05 14:54:34.000000000","message":"Done","commit_id":"b8b6161ec2a5a5e95ed0c1e671d686f38840af07"},{"author":{"_account_id":25600,"name":"Ebbex","display_name":"ebbex","email":"openstack@slipsprogrammor.no","username":"ebbex"},"change_message_id":"e7f64878b4fc49b40b82dd73a4f558438515b622","unresolved":true,"context_lines":[{"line_number":27,"context_line":"    query: \"{{ is_metal | ternary(metal_query, non_metal_query) }}\""},{"line_number":28,"context_line":"    non_metal_query: \"container_networks.{{ network_address }}.address || ansible_host\""},{"line_number":29,"context_line":"    find_bridge: \"container_networks.{{ network_address }}.bridge\""},{"line_number":30,"context_line":"    metal_query: \"\\\"ansible_facts.{{ hostvars[inventory_hostname] | json_query(find_bridge) | replace(\u0027-\u0027,\u0027_\u0027) }}\\\".ipv4.address || {{ non_metal_query }}\""},{"line_number":31,"context_line":"  tags:"},{"line_number":32,"context_line":"    - common-address"},{"line_number":33,"context_line":"    - always"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"328620f3_b621aa25","line":30,"range":{"start_line":30,"start_character":113,"end_line":30,"end_character":115},"updated":"2021-03-05 15:58:36.000000000","message":"And this need to go.","commit_id":"72b250a821d5762008a809c517765c5a6eddd8f5"},{"author":{"_account_id":25600,"name":"Ebbex","display_name":"ebbex","email":"openstack@slipsprogrammor.no","username":"ebbex"},"change_message_id":"e7f64878b4fc49b40b82dd73a4f558438515b622","unresolved":true,"context_lines":[{"line_number":27,"context_line":"    query: \"{{ is_metal | ternary(metal_query, non_metal_query) }}\""},{"line_number":28,"context_line":"    non_metal_query: \"container_networks.{{ network_address }}.address || ansible_host\""},{"line_number":29,"context_line":"    find_bridge: \"container_networks.{{ network_address }}.bridge\""},{"line_number":30,"context_line":"    metal_query: \"\\\"ansible_facts.{{ hostvars[inventory_hostname] | json_query(find_bridge) | replace(\u0027-\u0027,\u0027_\u0027) }}\\\".ipv4.address || {{ non_metal_query }}\""},{"line_number":31,"context_line":"  tags:"},{"line_number":32,"context_line":"    - common-address"},{"line_number":33,"context_line":"    - always"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"89c91702_27357187","line":30,"range":{"start_line":30,"start_character":18,"end_line":30,"end_character":20},"updated":"2021-03-05 15:58:36.000000000","message":"I think these need to go.","commit_id":"72b250a821d5762008a809c517765c5a6eddd8f5"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"49b9b641750304ebbd89dae427e9e4d6442f2c53","unresolved":true,"context_lines":[{"line_number":16,"context_line":"- name: Gathering facts for {{ network_address }} interface on metal hosts"},{"line_number":17,"context_line":"  setup:"},{"line_number":18,"context_line":"    gather_subset: \"!all,network\""},{"line_number":19,"context_line":"    filter: \"{{ dynamic_address_gather_filter | default((\u0027ansible_\u0027 ~ container_networks[network_address][\u0027bridge\u0027]) | replace(\u0027-\u0027,\u0027_\u0027)) }}\""},{"line_number":20,"context_line":"  when:"},{"line_number":21,"context_line":"    - is_metal"},{"line_number":22,"context_line":"    - (dynamic_address_gather_filter is defined) or (container_networks[network_address] is defined and container_networks[network_address][\u0027bridge\u0027] is defined)"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"a47a03db_6298c8f4","line":19,"range":{"start_line":19,"start_character":57,"end_line":19,"end_character":115},"updated":"2021-04-06 15:42:03.000000000","message":"this could be ansible_facts[container_networks[network_address][\u0027bridge\u0027] | replace(\u0027-\u0027,\u0027_\u0027)]","commit_id":"b5214dfd5e1644422bd1b3c4717cb0db86681630"},{"author":{"_account_id":25023,"name":"Jonathan Rosser","email":"jonathan.rosser@rd.bbc.co.uk","username":"jrosser"},"change_message_id":"ac0190df99c35264313e1d28b527c1821674a1c2","unresolved":true,"context_lines":[{"line_number":16,"context_line":"- name: Gathering facts for {{ network_address }} interface on metal hosts"},{"line_number":17,"context_line":"  setup:"},{"line_number":18,"context_line":"    gather_subset: \"!all,network\""},{"line_number":19,"context_line":"    filter: \"{{ dynamic_address_gather_filter | default((\u0027ansible_\u0027 ~ container_networks[network_address][\u0027bridge\u0027]) | replace(\u0027-\u0027,\u0027_\u0027)) }}\""},{"line_number":20,"context_line":"  when:"},{"line_number":21,"context_line":"    - is_metal"},{"line_number":22,"context_line":"    - (dynamic_address_gather_filter is defined) or (container_networks[network_address] is defined and container_networks[network_address][\u0027bridge\u0027] is defined)"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"b680109b_fee8360f","line":19,"range":{"start_line":19,"start_character":57,"end_line":19,"end_character":115},"in_reply_to":"a47a03db_6298c8f4","updated":"2021-04-06 15:52:42.000000000","message":"Thats not using a facts var to return the bridge name, it\u0027s defaulting the value to a string like \"ansible_br_mgmt\"\n\nIt\u0027s quite easy to copy this task out into a test.yml and poke at the behaviour for real tbh - I can\u0027t say without trying it if any adjustments to this will work or not.","commit_id":"b5214dfd5e1644422bd1b3c4717cb0db86681630"},{"author":{"_account_id":28619,"name":"Dmitriy Rabotyagov","email":"noonedeadpunk@gmail.com","username":"noonedeadpunk"},"change_message_id":"abf5fdfa4dce56d65cecca3f5e1927a9fcf9f051","unresolved":true,"context_lines":[{"line_number":16,"context_line":"- name: Gathering facts for {{ network_address }} interface on metal hosts"},{"line_number":17,"context_line":"  setup:"},{"line_number":18,"context_line":"    gather_subset: \"!all,network\""},{"line_number":19,"context_line":"    filter: \"{{ dynamic_address_gather_filter | default((\u0027ansible_\u0027 ~ container_networks[network_address][\u0027bridge\u0027]) | replace(\u0027-\u0027,\u0027_\u0027)) }}\""},{"line_number":20,"context_line":"  when:"},{"line_number":21,"context_line":"    - is_metal"},{"line_number":22,"context_line":"    - (dynamic_address_gather_filter is defined) or (container_networks[network_address] is defined and container_networks[network_address][\u0027bridge\u0027] is defined)"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"3c605631_324a9d44","line":19,"range":{"start_line":19,"start_character":57,"end_line":19,"end_character":115},"in_reply_to":"a47a03db_6298c8f4","updated":"2021-04-06 16:00:22.000000000","message":"disregard please","commit_id":"b5214dfd5e1644422bd1b3c4717cb0db86681630"}]}
