)]}'
{"ansible/roles/ssh-known-host/tasks/main.yml":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"67e9752024c3733c6b74f9579aa6f399675e840b","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    module: known_hosts"},{"line_number":31,"context_line":"    host: \"{{ item[0].item }}\""},{"line_number":32,"context_line":"    key: \"{{ item[1] }}\""},{"line_number":33,"context_line":"  with_subelements:"},{"line_number":34,"context_line":"    - \"{{ keyscan_result.results }}\""},{"line_number":35,"context_line":"    - stdout_lines"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"ff570b3c_113b70d1","line":35,"range":{"start_line":33,"start_character":0,"end_line":35,"end_character":18},"updated":"2020-05-11 10:18:17.000000000","message":"There is probably some loop you could use with run_once. Something like\n\nloop: \"{{ query(\u0027subelements\u0027, ansible_play_batch | map(\u0027extract\u0027, hostvars, [\u0027keyscan_result\u0027, \u0027results\u0027]) | list, \u0027stdout_lines\u0027) }}\"","commit_id":"e1fca5d22a89a43b358651de00849aee2cb709e7"},{"author":{"_account_id":30491,"name":"Radosław Piliszek","display_name":"Radek","email":"radek@piliszek.it","username":"yoctozepto","status":"self-employed techologist, collaborating mostly with 7bulls.com"},"change_message_id":"0fa5659ff8df9570dfc291efaf8ae4d04105df53","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    module: known_hosts"},{"line_number":31,"context_line":"    host: \"{{ item[0].item }}\""},{"line_number":32,"context_line":"    key: \"{{ item[1] }}\""},{"line_number":33,"context_line":"  with_subelements:"},{"line_number":34,"context_line":"    - \"{{ keyscan_result.results }}\""},{"line_number":35,"context_line":"    - stdout_lines"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"ff570b3c_3df3e5a0","line":35,"range":{"start_line":33,"start_character":0,"end_line":35,"end_character":18},"in_reply_to":"ff570b3c_113b70d1","updated":"2020-05-11 13:37:05.000000000","message":"This is already local_action. The problem is in the loop itself the way I understand it.","commit_id":"e1fca5d22a89a43b358651de00849aee2cb709e7"},{"author":{"_account_id":30491,"name":"Radosław Piliszek","display_name":"Radek","email":"radek@piliszek.it","username":"yoctozepto","status":"self-employed techologist, collaborating mostly with 7bulls.com"},"change_message_id":"801f734f3a368ca815f36f9f80a3b51f073917e1","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    module: known_hosts"},{"line_number":31,"context_line":"    host: \"{{ item[0].item }}\""},{"line_number":32,"context_line":"    key: \"{{ item[1] }}\""},{"line_number":33,"context_line":"  with_subelements:"},{"line_number":34,"context_line":"    - \"{{ keyscan_result.results }}\""},{"line_number":35,"context_line":"    - stdout_lines"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"ff570b3c_7d30bd08","line":35,"range":{"start_line":33,"start_character":0,"end_line":35,"end_character":18},"in_reply_to":"ff570b3c_1d8f01cd","updated":"2020-05-11 13:48:44.000000000","message":"Hah, I was under the impression that local_action implied run_once (i.e. it was like delegate:localhost+run_once). Seems I was mistaken.","commit_id":"e1fca5d22a89a43b358651de00849aee2cb709e7"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"cb9ac9285a95952a96f9bc2c72d73cd342029a17","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    module: known_hosts"},{"line_number":31,"context_line":"    host: \"{{ item[0].item }}\""},{"line_number":32,"context_line":"    key: \"{{ item[1] }}\""},{"line_number":33,"context_line":"  with_subelements:"},{"line_number":34,"context_line":"    - \"{{ keyscan_result.results }}\""},{"line_number":35,"context_line":"    - stdout_lines"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"ff570b3c_dd3aa932","line":35,"range":{"start_line":33,"start_character":0,"end_line":35,"end_character":18},"in_reply_to":"ff570b3c_3df3e5a0","updated":"2020-05-11 13:38:33.000000000","message":"The problem is executing in parallel. Without serial or throttle, we need run_once.","commit_id":"e1fca5d22a89a43b358651de00849aee2cb709e7"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"c1c54d5c0300b3aaa23f704f1442ad9e0e26b005","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    module: known_hosts"},{"line_number":31,"context_line":"    host: \"{{ item[0].item }}\""},{"line_number":32,"context_line":"    key: \"{{ item[1] }}\""},{"line_number":33,"context_line":"  with_subelements:"},{"line_number":34,"context_line":"    - \"{{ keyscan_result.results }}\""},{"line_number":35,"context_line":"    - stdout_lines"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"ff570b3c_1d8f01cd","line":35,"range":{"start_line":33,"start_character":0,"end_line":35,"end_character":18},"in_reply_to":"ff570b3c_dd3aa932","updated":"2020-05-11 13:46:15.000000000","message":"Thanks Mark. Your solution looks better than others I found on Ansible issue threads. I uploaded a new patch.","commit_id":"e1fca5d22a89a43b358651de00849aee2cb709e7"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"76545704d1af21c6bd868c0d50a94918150831c4","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  local_action:"},{"line_number":18,"context_line":"    module: command ssh-keyscan {{ item }}"},{"line_number":19,"context_line":"  with_items:"},{"line_number":20,"context_line":"    - \"{{ ansible_host|default(inventory_hostname) }}\""},{"line_number":21,"context_line":"  register: keyscan_result"},{"line_number":22,"context_line":"  changed_when: False"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"ff570b3c_ce469c21","line":20,"updated":"2020-06-05 09:54:29.000000000","message":"Isn\u0027t this always a list of one item?","commit_id":"c5b2d435eeb13f497fd71bd0c8b85b6ef4a9a731"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"701c738a4aea2e8d492bf117c2994c86a25a1556","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  local_action:"},{"line_number":18,"context_line":"    module: command ssh-keyscan {{ item }}"},{"line_number":19,"context_line":"  with_items:"},{"line_number":20,"context_line":"    - \"{{ ansible_host|default(inventory_hostname) }}\""},{"line_number":21,"context_line":"  register: keyscan_result"},{"line_number":22,"context_line":"  changed_when: False"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"ff570b3c_eed0c021","line":20,"in_reply_to":"ff570b3c_ce469c21","updated":"2020-06-05 09:58:14.000000000","message":"You mean we can probably replace {{ item }} with {{ ansible_host|default(inventory_hostname) }}?","commit_id":"c5b2d435eeb13f497fd71bd0c8b85b6ef4a9a731"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"cd757085eed0bba608fc8194ff850941e5e580e0","unresolved":false,"context_lines":[{"line_number":17,"context_line":"  local_action:"},{"line_number":18,"context_line":"    module: command ssh-keyscan {{ item }}"},{"line_number":19,"context_line":"  with_items:"},{"line_number":20,"context_line":"    - \"{{ ansible_host|default(inventory_hostname) }}\""},{"line_number":21,"context_line":"  register: keyscan_result"},{"line_number":22,"context_line":"  changed_when: False"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"ff570b3c_0957ee59","line":20,"in_reply_to":"ff570b3c_eed0c021","updated":"2020-06-05 11:03:45.000000000","message":"Yes. I started removing the loop, but the logic below was simpler with it in place.","commit_id":"c5b2d435eeb13f497fd71bd0c8b85b6ef4a9a731"}]}
