)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"89861510ca7bfd7d751e82ed004d147949c54fec","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2019-01-08 00:54:14 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Workaround ssh_known_hosts changes not being propagated to containers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ie6af5908d4b79bad094bce31e8e853678c0e843c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dfd5e7cf_81216650","line":8,"updated":"2019-01-08 08:27:00.000000000","message":"is there a bug or other thing to point to please for more info (i saw the pull request but https://github.com/ansible/ansible/issues/20633 where/how is it hitting us)","commit_id":"d3c9e717c15676a219754f5e9e0a1c333b3ab031"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"5a4a3e0b8e948f128abb7779df1d7222f4d19072","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2019-01-08 00:54:14 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Workaround ssh_known_hosts changes not being propagated to containers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Ie6af5908d4b79bad094bce31e8e853678c0e843c"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"dfd5e7cf_872416c8","line":8,"in_reply_to":"dfd5e7cf_81216650","updated":"2019-01-08 10:59:33.000000000","message":"https://bugzilla.redhat.com/show_bug.cgi?id\u003d1664165 - I\u0027ll raise an LP for it now, just wanted to get some CI on this overnight","commit_id":"d3c9e717c15676a219754f5e9e0a1c333b3ab031"}],"roles/tripleo-ssh-known-hosts/tasks/main.yml":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"89861510ca7bfd7d751e82ed004d147949c54fec","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    # Workaround https://github.com/ansible/ansible/issues/20633"},{"line_number":6,"context_line":"    # Ansible modules perform a replace instead of in-place modification."},{"line_number":7,"context_line":"    # This breaks propagation of changes to containers that bind mount ssh_known_hosts"},{"line_number":8,"context_line":"    - shell: |"},{"line_number":9,"context_line":"        if [[ -e /etc/ssh/ssh_known_hosts ]]; then"},{"line_number":10,"context_line":"          cat /etc/ssh/ssh_known_hosts \u003e /tmp/tripleo_ssh_known_hosts.tmp"},{"line_number":11,"context_line":"        fi"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"dfd5e7cf_81e64616","line":8,"updated":"2019-01-08 08:27:00.000000000","message":"its kind of tidier to look at like this but I think adding names to these tasks will make the logs easier to read later.","commit_id":"d3c9e717c15676a219754f5e9e0a1c333b3ab031"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"536508e89dafc9f2f4711227f7e6d1c0645a4051","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    - name: Create a temporary copy of ssh_known_hosts"},{"line_number":9,"context_line":"      shell: |"},{"line_number":10,"context_line":"        if [[ -e /etc/ssh/ssh_known_hosts ]]; then"},{"line_number":11,"context_line":"          cat /etc/ssh/ssh_known_hosts \u003e /tmp/tripleo_ssh_known_hosts.tmp"},{"line_number":12,"context_line":"        fi"},{"line_number":13,"context_line":"    - name: Add host keys to temporary ssh_known_hosts"},{"line_number":14,"context_line":"      lineinfile:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"dfd5e7cf_2f9bbc72","line":11,"updated":"2019-01-08 14:16:28.000000000","message":"I can\u0027t be bothered to fetch my black hat from the cupboard to work this all the way through, but I suspect we want to be using mktemp here, or similar. Ansible probably has something to do this securely, right? At the very least it\u0027s got to be simpler to just use mktemp than spending a day convincing yourself that you don\u0027t need it here.","commit_id":"591fca669c0c178d45255c16c17f45231847dbb4"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"9ddbb359680c1c6d80cf0c3dc82c3581a6ffae72","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    - name: Create a temporary copy of ssh_known_hosts"},{"line_number":9,"context_line":"      shell: |"},{"line_number":10,"context_line":"        if [[ -e /etc/ssh/ssh_known_hosts ]]; then"},{"line_number":11,"context_line":"          cat /etc/ssh/ssh_known_hosts \u003e /tmp/tripleo_ssh_known_hosts.tmp"},{"line_number":12,"context_line":"        fi"},{"line_number":13,"context_line":"    - name: Add host keys to temporary ssh_known_hosts"},{"line_number":14,"context_line":"      lineinfile:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"dfd5e7cf_5b1921d5","line":11,"in_reply_to":"dfd5e7cf_252e7da5","updated":"2019-01-08 17:10:57.000000000","message":"same issue with copy... I\u0027d expect all of the core ansible file modules to use atomic move","commit_id":"591fca669c0c178d45255c16c17f45231847dbb4"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"6dcdef613b46ea535ba35730ae75573858c28742","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    - name: Create a temporary copy of ssh_known_hosts"},{"line_number":9,"context_line":"      shell: |"},{"line_number":10,"context_line":"        if [[ -e /etc/ssh/ssh_known_hosts ]]; then"},{"line_number":11,"context_line":"          cat /etc/ssh/ssh_known_hosts \u003e /tmp/tripleo_ssh_known_hosts.tmp"},{"line_number":12,"context_line":"        fi"},{"line_number":13,"context_line":"    - name: Add host keys to temporary ssh_known_hosts"},{"line_number":14,"context_line":"      lineinfile:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"dfd5e7cf_85e3a905","line":11,"in_reply_to":"dfd5e7cf_2f9bbc72","updated":"2019-01-08 15:24:24.000000000","message":"we can probably use https://docs.ansible.com/ansible/latest/modules/tempfile_module.html here","commit_id":"591fca669c0c178d45255c16c17f45231847dbb4"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"825bcd00ac8ba44c750972739851fce438be5ce2","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    - name: Create a temporary copy of ssh_known_hosts"},{"line_number":9,"context_line":"      shell: |"},{"line_number":10,"context_line":"        if [[ -e /etc/ssh/ssh_known_hosts ]]; then"},{"line_number":11,"context_line":"          cat /etc/ssh/ssh_known_hosts \u003e /tmp/tripleo_ssh_known_hosts.tmp"},{"line_number":12,"context_line":"        fi"},{"line_number":13,"context_line":"    - name: Add host keys to temporary ssh_known_hosts"},{"line_number":14,"context_line":"      lineinfile:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"dfd5e7cf_45c2a135","line":11,"in_reply_to":"dfd5e7cf_2f9bbc72","updated":"2019-01-08 15:29:17.000000000","message":"yea... I made a mental note to do that when I threw this together late last night","commit_id":"591fca669c0c178d45255c16c17f45231847dbb4"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"db3e4b373b93b9bc68ecdb8c54a137c0761ae612","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    - name: Create a temporary copy of ssh_known_hosts"},{"line_number":9,"context_line":"      shell: |"},{"line_number":10,"context_line":"        if [[ -e /etc/ssh/ssh_known_hosts ]]; then"},{"line_number":11,"context_line":"          cat /etc/ssh/ssh_known_hosts \u003e /tmp/tripleo_ssh_known_hosts.tmp"},{"line_number":12,"context_line":"        fi"},{"line_number":13,"context_line":"    - name: Add host keys to temporary ssh_known_hosts"},{"line_number":14,"context_line":"      lineinfile:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"dfd5e7cf_252e7da5","line":11,"in_reply_to":"dfd5e7cf_45c2a135","updated":"2019-01-08 15:42:46.000000000","message":"You could also do this in pure ansible with copy to do the copying unless also suffers from the unsafe write stuff?\n\n- name: ssh_known_hosts exists\n  stat: path\u003d/etc/ssh/ssh_known_hosts\n  register: ssh_known_hosts_stat\n\n- name: temp ssh_known_hosts\n  tempfile:\n    state: file\n  register: temp_ssh_known_host\n\n- name: copy ssh_known_hosts\n  copy:\n    remote_src: True\n    src: ssh_known_hosts_stat.path\n    dest: temp_ssh_known_hosts.path\n  when: ssh_known_hosts_stat.exists\n\n...","commit_id":"591fca669c0c178d45255c16c17f45231847dbb4"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"933b7d9b4d311689268e241386f9cb00d935c2cb","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    - name: In-place update of /etc/ssh_known_hosts"},{"line_number":24,"context_line":"      shell: |"},{"line_number":25,"context_line":"        cat \u0027{{ ssh_known_hosts_tmp.path }}\u0027 \u003e /etc/ssh/ssh_known_hosts"},{"line_number":26,"context_line":"        rm -f \u0027{{ ssh_known_hosts_tmp.path }}\u0027"},{"line_number":27,"context_line":"  tags:"},{"line_number":28,"context_line":"    - tripleo_ssh_known_hosts"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dfd5e7cf_3b63fd1c","line":26,"range":{"start_line":26,"start_character":8,"end_line":26,"end_character":46},"updated":"2019-01-08 17:18:58.000000000","message":"we don\u0027t need this, tempfile will clean this up at the end of the execution","commit_id":"ca60b82be840a91e76a965438f0cdd35c9a2baca"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"7c73c47082dc579e8de9f09cb857e4cbad113349","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    - name: In-place update of /etc/ssh_known_hosts"},{"line_number":24,"context_line":"      shell: |"},{"line_number":25,"context_line":"        cat \u0027{{ ssh_known_hosts_tmp.path }}\u0027 \u003e /etc/ssh/ssh_known_hosts"},{"line_number":26,"context_line":"        rm -f \u0027{{ ssh_known_hosts_tmp.path }}\u0027"},{"line_number":27,"context_line":"  tags:"},{"line_number":28,"context_line":"    - tripleo_ssh_known_hosts"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dfd5e7cf_de3dffbb","line":26,"range":{"start_line":26,"start_character":8,"end_line":26,"end_character":46},"in_reply_to":"dfd5e7cf_3b63fd1c","updated":"2019-01-08 17:28:24.000000000","message":"really? I didn\u0027t see anything in the tempfile module source","commit_id":"ca60b82be840a91e76a965438f0cdd35c9a2baca"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"cf6f2badd53d409b5770fa2ba39919779d64b30b","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    - name: In-place update of /etc/ssh_known_hosts"},{"line_number":24,"context_line":"      shell: |"},{"line_number":25,"context_line":"        cat \u0027{{ ssh_known_hosts_tmp.path }}\u0027 \u003e /etc/ssh/ssh_known_hosts"},{"line_number":26,"context_line":"        rm -f \u0027{{ ssh_known_hosts_tmp.path }}\u0027"},{"line_number":27,"context_line":"  tags:"},{"line_number":28,"context_line":"    - tripleo_ssh_known_hosts"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dfd5e7cf_bec59b90","line":26,"range":{"start_line":26,"start_character":8,"end_line":26,"end_character":46},"in_reply_to":"dfd5e7cf_be97db90","updated":"2019-01-08 17:33:21.000000000","message":"Right that uses python\u0027s tempfile which cleans itself up when python exits.\n\nhttps://docs.python.org/2/library/tempfile.html#tempfile.mkstemp","commit_id":"ca60b82be840a91e76a965438f0cdd35c9a2baca"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"0dd3c4f6b88376848a0c7c929071d69893aa04de","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    - name: In-place update of /etc/ssh_known_hosts"},{"line_number":24,"context_line":"      shell: |"},{"line_number":25,"context_line":"        cat \u0027{{ ssh_known_hosts_tmp.path }}\u0027 \u003e /etc/ssh/ssh_known_hosts"},{"line_number":26,"context_line":"        rm -f \u0027{{ ssh_known_hosts_tmp.path }}\u0027"},{"line_number":27,"context_line":"  tags:"},{"line_number":28,"context_line":"    - tripleo_ssh_known_hosts"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dfd5e7cf_9ebc5706","line":26,"range":{"start_line":26,"start_character":8,"end_line":26,"end_character":46},"in_reply_to":"dfd5e7cf_bec59b90","updated":"2019-01-08 17:34:00.000000000","message":"Nevermind.\n\nUnlike TemporaryFile(), the user of mkstemp() is responsible for deleting the temporary file when done with it.","commit_id":"ca60b82be840a91e76a965438f0cdd35c9a2baca"},{"author":{"_account_id":23811,"name":"Oliver Walsh","email":"owalsh@redhat.com","username":"owalsh"},"change_message_id":"616c29b1d10daa5b11a86f9218f3605f58de6ccd","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    - name: In-place update of /etc/ssh_known_hosts"},{"line_number":24,"context_line":"      shell: |"},{"line_number":25,"context_line":"        cat \u0027{{ ssh_known_hosts_tmp.path }}\u0027 \u003e /etc/ssh/ssh_known_hosts"},{"line_number":26,"context_line":"        rm -f \u0027{{ ssh_known_hosts_tmp.path }}\u0027"},{"line_number":27,"context_line":"  tags:"},{"line_number":28,"context_line":"    - tripleo_ssh_known_hosts"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dfd5e7cf_be97db90","line":26,"range":{"start_line":26,"start_character":8,"end_line":26,"end_character":46},"in_reply_to":"dfd5e7cf_de3dffbb","updated":"2019-01-08 17:31:34.000000000","message":"Here - https://github.com/ansible/ansible/blob/05c6ff79f9860dbd6b43cb4914ee749baf65b9f7/lib/ansible/modules/files/tempfile.py#L97","commit_id":"ca60b82be840a91e76a965438f0cdd35c9a2baca"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"b0729e1f09944b1113d910d168ae280a4ffdae2e","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    - name: In-place update of /etc/ssh_known_hosts"},{"line_number":24,"context_line":"      shell: |"},{"line_number":25,"context_line":"        cat \u0027{{ ssh_known_hosts_tmp.path }}\u0027 \u003e /etc/ssh/ssh_known_hosts"},{"line_number":26,"context_line":"        rm -f \u0027{{ ssh_known_hosts_tmp.path }}\u0027"},{"line_number":27,"context_line":"  tags:"},{"line_number":28,"context_line":"    - tripleo_ssh_known_hosts"},{"line_number":29,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dfd5e7cf_7eb89329","line":26,"range":{"start_line":26,"start_character":8,"end_line":26,"end_character":46},"in_reply_to":"dfd5e7cf_de3dffbb","updated":"2019-01-08 17:30:37.000000000","message":"pretty sure, let me see.","commit_id":"ca60b82be840a91e76a965438f0cdd35c9a2baca"}]}
