)]}'
{"tripleo_ansible/roles/octavia-undercloud/tasks/image_mgmt.yml":[{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"646e79ab4bc045c407bd4ae602c65c67059d468d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"    amphora_image: \"{{ amphora_image_name }}\""},{"line_number":10,"context_line":"  when:"},{"line_number":11,"context_line":"    - amphora_image_name is defined"},{"line_number":12,"context_line":"    - amphora_image_name | length \u003e 0"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"- name: set the actual glance image name if it is a symlink"},{"line_number":15,"context_line":"  set_fact:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_e4841ab4","line":12,"range":{"start_line":12,"start_character":6,"end_line":12,"end_character":33},"updated":"2019-09-16 15:04:00.000000000","message":"I generally wrap something like this in parenthesis.","commit_id":"dbd2ce6efa8e5a7167d4532904f72eaa69e5e976"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"646e79ab4bc045c407bd4ae602c65c67059d468d","unresolved":false,"context_lines":[{"line_number":16,"context_line":"    amphora_image: \"{{ (symlnk_check.stat.lnk_target | basename | splitext)[0] }}\""},{"line_number":17,"context_line":"  when:"},{"line_number":18,"context_line":"    - amphora_image is undefined"},{"line_number":19,"context_line":"    - symlnk_check is defined and symlnk_check.stat.islnk"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"- name: set the actual glance image name if it is not a symlink"},{"line_number":22,"context_line":"  set_fact:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_a4a70250","line":19,"range":{"start_line":19,"start_character":5,"end_line":19,"end_character":57},"updated":"2019-09-16 15:04:00.000000000","message":"given the task structure I think `symlnk_check` will always be defined. At this point I think its safe to run something like \n\n  symlnk_check.stat.islnk | bool","commit_id":"dbd2ce6efa8e5a7167d4532904f72eaa69e5e976"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"499201b97abbcbda9fc39cafd1e2af3f896425e4","unresolved":false,"context_lines":[{"line_number":16,"context_line":"    amphora_image: \"{{ (symlnk_check.stat.lnk_target | basename | splitext)[0] }}\""},{"line_number":17,"context_line":"  when:"},{"line_number":18,"context_line":"    - amphora_image is undefined"},{"line_number":19,"context_line":"    - symlnk_check is defined and symlnk_check.stat.islnk"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"- name: set the actual glance image name if it is not a symlink"},{"line_number":22,"context_line":"  set_fact:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_20c20535","line":19,"range":{"start_line":19,"start_character":5,"end_line":19,"end_character":57},"in_reply_to":"3fa7e38b_a4a70250","updated":"2019-09-17 17:16:11.000000000","message":"is the |bool necessary (i.e. are the ansible web docs that bad?)","commit_id":"dbd2ce6efa8e5a7167d4532904f72eaa69e5e976"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"646e79ab4bc045c407bd4ae602c65c67059d468d","unresolved":false,"context_lines":[{"line_number":24,"context_line":"  when:"},{"line_number":25,"context_line":"    - amphora_image is undefined"},{"line_number":26,"context_line":"    - image_file_result.stat.exists"},{"line_number":27,"context_line":"    - not symlnk_check.stat.islnk"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"- name: Capture the md5 checksum for the file"},{"line_number":30,"context_line":"  set_fact:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_2471d2e1","line":27,"range":{"start_line":27,"start_character":6,"end_line":27,"end_character":33},"updated":"2019-09-16 15:04:00.000000000","message":"not (symlnk_check.stat.islnk | bool)","commit_id":"dbd2ce6efa8e5a7167d4532904f72eaa69e5e976"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"646e79ab4bc045c407bd4ae602c65c67059d468d","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    - name: set RAW file name"},{"line_number":43,"context_line":"      set_fact:"},{"line_number":44,"context_line":"        raw_filename: \"{{ amp_tmp_dir.path }}/{{ image_filename|splitext|first|basename }}.img\""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    - name: convert image from qcow2 to raw"},{"line_number":47,"context_line":"      shell: |"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_64502a34","line":44,"range":{"start_line":44,"start_character":49,"end_line":44,"end_character":87},"updated":"2019-09-16 15:04:00.000000000","message":"this is a lot of filters, do we need all this ?","commit_id":"dbd2ce6efa8e5a7167d4532904f72eaa69e5e976"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"499201b97abbcbda9fc39cafd1e2af3f896425e4","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    - name: set RAW file name"},{"line_number":43,"context_line":"      set_fact:"},{"line_number":44,"context_line":"        raw_filename: \"{{ amp_tmp_dir.path }}/{{ image_filename|splitext|first|basename }}.img\""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    - name: convert image from qcow2 to raw"},{"line_number":47,"context_line":"      shell: |"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_60247d0e","line":44,"range":{"start_line":44,"start_character":49,"end_line":44,"end_character":87},"in_reply_to":"3fa7e38b_64502a34","updated":"2019-09-17 17:16:11.000000000","message":"I think so - split the extension off, grab the first part of the result which is everything but the extension, then just get rid of the path part.","commit_id":"dbd2ce6efa8e5a7167d4532904f72eaa69e5e976"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"646e79ab4bc045c407bd4ae602c65c67059d468d","unresolved":false,"context_lines":[{"line_number":142,"context_line":"  register: image_result"},{"line_number":143,"context_line":"  changed_when: (image_result.stdout | length) \u003c 1"},{"line_number":144,"context_line":"  when:"},{"line_number":145,"context_line":"    - image_file_result.stat.exists"},{"line_number":146,"context_line":"    - upload_image is defined"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"- name: delete converted raw image"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_a455c21f","line":145,"range":{"start_line":145,"start_character":6,"end_line":145,"end_character":35},"updated":"2019-09-16 15:04:00.000000000","message":"I think this could be\n\n  image_file_result.stat.exists | bool","commit_id":"dbd2ce6efa8e5a7167d4532904f72eaa69e5e976"}],"tripleo_ansible/roles/octavia_undercloud/tasks/image_mgmt.yml":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"b95c19b60e7310d9965cc3d0ffb3afdf744809a5","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"     # We don\u0027t bother with when clauses etc, if this fails something"},{"line_number":60,"context_line":"     # bad happened and we want to fail anyways."},{"line_number":61,"context_line":"     - name: update image_md5 with proper value"},{"line_number":62,"context_line":"       set_fact:"},{"line_number":63,"context_line":"         image_md5: \"{{ raw_file_result.stat.md5 }}\""},{"line_number":64,"context_line":"  when:"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"fffc6b78_b57c2a21","line":61,"updated":"2020-11-18 20:47:03.000000000","message":"linters: [error] syntax error: expected \u003cblock end\u003e, but found \u0027\u003cblock sequence start\u003e\u0027 (syntax)","commit_id":"0dd6a81eda03c1b849fc872a7fc7039714097949"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"25ce5d47940faf1319feb5e50b1f218615cb5cc4","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"     # We don\u0027t bother with when clauses etc, if this fails something"},{"line_number":60,"context_line":"     # bad happened and we want to fail anyways."},{"line_number":61,"context_line":"     - name: update image_md5 with proper value"},{"line_number":62,"context_line":"       set_fact:"},{"line_number":63,"context_line":"         image_md5: \"{{ raw_file_result.stat.md5 }}\""},{"line_number":64,"context_line":"  when:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"fffc6b78_5804157c","line":61,"updated":"2020-11-18 22:12:07.000000000","message":"linters: [error] syntax error: expected \u003cblock end\u003e, but found \u0027\u003cblock sequence start\u003e\u0027 (syntax)","commit_id":"76f0d3943ed4b7c648dc552749ea609c612ee4ba"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"07a2c5ed33ff144472c03d3b517d190e62650947","unresolved":false,"context_lines":[{"line_number":35,"context_line":"  when:"},{"line_number":36,"context_line":"    - amp_to_raw | bool"},{"line_number":37,"context_line":"  block:"},{"line_number":38,"context_line":"  - name: create temporary directory"},{"line_number":39,"context_line":"    tempfile:"},{"line_number":40,"context_line":"      state: directory"},{"line_number":41,"context_line":"    register: amp_tmp_dir"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"fffc6b78_69bc9bbb","line":38,"updated":"2020-11-19 21:34:37.000000000","message":"linters: [error] wrong indentation: expected 4 but found 2 (indentation)","commit_id":"afdd87d217a16a2f4eea5403e971aa7a0dca49b5"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"07a2c5ed33ff144472c03d3b517d190e62650947","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"   # We don\u0027t bother with when clauses etc, if this fails something"},{"line_number":62,"context_line":"   # bad happened and we want to fail anyways."},{"line_number":63,"context_line":"   - name: update image_md5 with proper value"},{"line_number":64,"context_line":"     set_fact:"},{"line_number":65,"context_line":"       image_md5: \"{{ raw_file_result.stat.md5 }}\""},{"line_number":66,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"fffc6b78_c9b147e4","line":63,"updated":"2020-11-19 21:34:37.000000000","message":"linters: [error] syntax error: expected \u003cblock end\u003e, but found \u0027\u003cblock sequence start\u003e\u0027 (syntax)","commit_id":"afdd87d217a16a2f4eea5403e971aa7a0dca49b5"},{"author":{"_account_id":14985,"name":"Alex Schultz","email":"aschultz@next-development.com","username":"mwhahaha"},"change_message_id":"0450e778c768de43c2196c16032bc53aaf86bb43","unresolved":true,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"- name: Capture the md5 checksum for the file"},{"line_number":29,"context_line":"  set_fact:"},{"line_number":30,"context_line":"    image_md5: \"{{ image_file_result.stat.md5 }}\""},{"line_number":31,"context_line":"  when:"},{"line_number":32,"context_line":"    - image_file_result.stat.exists | bool"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":8,"id":"6ff17e80_6b542160","line":30,"range":{"start_line":30,"start_character":42,"end_line":30,"end_character":45},"updated":"2021-01-26 16:37:57.000000000","message":"per the documentation:\n\nmd5 hash of the file; this will be removed in Ansible 2.9 in favor of the checksum return value\n\nhttps://docs.ansible.com/ansible/devel/collections/ansible/builtin/stat_module.html#return-stat/md5","commit_id":"1777323c1016d0444c78371627d8a764d417a9e2"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"1ea813563932ff9eca1e70298b525a94b52a5c90","unresolved":true,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"- name: Capture the md5 checksum for the file"},{"line_number":29,"context_line":"  set_fact:"},{"line_number":30,"context_line":"    image_md5: \"{{ image_file_result.stat.md5 }}\""},{"line_number":31,"context_line":"  when:"},{"line_number":32,"context_line":"    - image_file_result.stat.exists | bool"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":8,"id":"70454169_29ebf4b2","line":30,"range":{"start_line":30,"start_character":42,"end_line":30,"end_character":45},"in_reply_to":"6ff17e80_6b542160","updated":"2021-01-26 17:19:16.000000000","message":"ack. Now is a good time to double check if we need to find a different way to compare the image on disk and the one in glance.","commit_id":"1777323c1016d0444c78371627d8a764d417a9e2"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"eb61640c3840f3b126f5f99bdc38a16a97c5cd47","unresolved":true,"context_lines":[{"line_number":85,"context_line":"    - glance_id_result.rc \u003d\u003d 0"},{"line_number":86,"context_line":"    - glance_id_result.stdout !\u003d \"\""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"- name: get checksum if there\u0027s an image in glance already"},{"line_number":89,"context_line":"  shell: |"},{"line_number":90,"context_line":"    openstack image show {{ glance_id_result.stdout }} -c properties -f json"},{"line_number":91,"context_line":"  environment:"},{"line_number":92,"context_line":"    OS_USERNAME: \"{{ auth_username }}\""},{"line_number":93,"context_line":"    OS_PASSWORD: \"{{ auth_password }}\""},{"line_number":94,"context_line":"    OS_PROJECT_NAME: \"{{ auth_project_name }}\""},{"line_number":95,"context_line":"  when:"},{"line_number":96,"context_line":"    - image_id is defined"},{"line_number":97,"context_line":"  register: glance_results"},{"line_number":98,"context_line":"  failed_when: false"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"- name: set current_checksum fact from glance if image already exists there"},{"line_number":101,"context_line":"  set_fact:"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"d03382a9_954ae43f","line":98,"range":{"start_line":88,"start_character":0,"end_line":98,"end_character":20},"updated":"2021-02-03 20:46:02.000000000","message":"we have the glance module. can we use that here instead? \n\n  https://docs.ansible.com/ansible/2.3/os_image_module.html#os-image","commit_id":"7d212d68c5a147da39b119bde5f2c9e40af4b617"},{"author":{"_account_id":6681,"name":"Brent Eagles","email":"beagles@redhat.com","username":"beagles"},"change_message_id":"e1294eb832abf9c2c23bc2fc8cb028913495edb2","unresolved":true,"context_lines":[{"line_number":85,"context_line":"    - glance_id_result.rc \u003d\u003d 0"},{"line_number":86,"context_line":"    - glance_id_result.stdout !\u003d \"\""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"- name: get checksum if there\u0027s an image in glance already"},{"line_number":89,"context_line":"  shell: |"},{"line_number":90,"context_line":"    openstack image show {{ glance_id_result.stdout }} -c properties -f json"},{"line_number":91,"context_line":"  environment:"},{"line_number":92,"context_line":"    OS_USERNAME: \"{{ auth_username }}\""},{"line_number":93,"context_line":"    OS_PASSWORD: \"{{ auth_password }}\""},{"line_number":94,"context_line":"    OS_PROJECT_NAME: \"{{ auth_project_name }}\""},{"line_number":95,"context_line":"  when:"},{"line_number":96,"context_line":"    - image_id is defined"},{"line_number":97,"context_line":"  register: glance_results"},{"line_number":98,"context_line":"  failed_when: false"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"- name: set current_checksum fact from glance if image already exists there"},{"line_number":101,"context_line":"  set_fact:"}],"source_content_type":"text/x-yaml","patch_set":12,"id":"d5bdb9a4_334ee271","line":98,"range":{"start_line":88,"start_character":0,"end_line":98,"end_character":20},"in_reply_to":"d03382a9_954ae43f","updated":"2021-03-24 14:05:01.000000000","message":"By the looks of it, I think the os_image module would actually only be useful for the upload of the image - not so much of querying and modifying. I\u0027m keen to modify the image create task below to a os_image as a follow up patch though. I\u0027d prefer to leave it separate because we\u0027ll likely need to backport this and I\u0027m not confident that we won\u0027t run into some sort of issue with earlier packaged versions of os_image.","commit_id":"7d212d68c5a147da39b119bde5f2c9e40af4b617"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"eb61640c3840f3b126f5f99bdc38a16a97c5cd47","unresolved":true,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    - name: download the current amphora image"},{"line_number":124,"context_line":"      command: |"},{"line_number":125,"context_line":"        openstack image save --file \"{{ amp_tmp_dir.path }}/{{ image_id }}.tmp\" {{ image_id }}"},{"line_number":126,"context_line":"      environment:"},{"line_number":127,"context_line":"        OS_USERNAME: \"{{ auth_username }}\""},{"line_number":128,"context_line":"        OS_PASSWORD: \"{{ auth_password }}\""}],"source_content_type":"text/x-yaml","patch_set":12,"id":"224a281d_273abd2d","line":125,"range":{"start_line":125,"start_character":8,"end_line":125,"end_character":94},"updated":"2021-02-03 20:46:02.000000000","message":"same as above.","commit_id":"7d212d68c5a147da39b119bde5f2c9e40af4b617"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"eb61640c3840f3b126f5f99bdc38a16a97c5cd47","unresolved":true,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    - name: store the property on the image so it is there next time"},{"line_number":142,"context_line":"      command: |"},{"line_number":143,"context_line":"        openstack image set --property image_checksum\u003d{{ current_checksum }}  {{ image_id }}"},{"line_number":144,"context_line":"      environment:"},{"line_number":145,"context_line":"        OS_USERNAME: \"{{ auth_username }}\""},{"line_number":146,"context_line":"        OS_PASSWORD: \"{{ auth_password }}\""}],"source_content_type":"text/x-yaml","patch_set":12,"id":"fc9df4f4_76ecaf74","line":143,"range":{"start_line":143,"start_character":8,"end_line":143,"end_character":92},"updated":"2021-02-03 20:46:02.000000000","message":"same as above","commit_id":"7d212d68c5a147da39b119bde5f2c9e40af4b617"}]}
