)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"756c5a78a7b0104f3b0339550521ed64489891f7","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"addc8911_3db815f0","line":15,"updated":"2021-03-31 09:06:27.000000000","message":"nit: story/task will help with backporting","commit_id":"7bcea5edc6e57dd82b386126821cf6f6001d95aa"}],"ansible/kolla-ansible.yml":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"867ddc28bc530082897e90790c9656cd7004d7f5","unresolved":true,"context_lines":[{"line_number":42,"context_line":"      block:"},{"line_number":43,"context_line":"        - name: Read the environment file from Kolla configuration path"},{"line_number":44,"context_line":"          set_fact:"},{"line_number":45,"context_line":"            kolla_environment: \"{{ lookup(\u0027file\u0027, kolla_config_path ~ \u0027/.environment\u0027) }}\""},{"line_number":46,"context_line":"        - name: Flag that the Kolla configuration path has been used by another environment"},{"line_number":47,"context_line":"          fail:"},{"line_number":48,"context_line":"            msg: \u003e"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3526a757_426bb2d3","line":45,"range":{"start_line":45,"start_character":12,"end_line":45,"end_character":90},"updated":"2021-03-26 17:50:12.000000000","message":"nit: could be a task variable, avoiding the block.","commit_id":"7bcea5edc6e57dd82b386126821cf6f6001d95aa"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"cc0e39816a1d7f18ca44aca1c9ccbe749af392d5","unresolved":true,"context_lines":[{"line_number":42,"context_line":"      block:"},{"line_number":43,"context_line":"        - name: Read the environment file from Kolla configuration path"},{"line_number":44,"context_line":"          set_fact:"},{"line_number":45,"context_line":"            kolla_environment: \"{{ lookup(\u0027file\u0027, kolla_config_path ~ \u0027/.environment\u0027) }}\""},{"line_number":46,"context_line":"        - name: Flag that the Kolla configuration path has been used by another environment"},{"line_number":47,"context_line":"          fail:"},{"line_number":48,"context_line":"            msg: \u003e"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"b7fdc917_47d71504","line":45,"range":{"start_line":45,"start_character":12,"end_line":45,"end_character":90},"in_reply_to":"0d91a271_489ff256","updated":"2021-03-31 10:06:08.000000000","message":"I don\u0027t quite see what you mean. I want to read the file only if it exists, hence the block and its when. Are you suggesting something like:\n\nkolla_environment: \"{{ kolla_environment_file.stat.exists | ternary(lookup..., \u0027\u0027) }}\"","commit_id":"7bcea5edc6e57dd82b386126821cf6f6001d95aa"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"18da64e759228d19f0e8c0868928a7ca98f47e8f","unresolved":true,"context_lines":[{"line_number":42,"context_line":"      block:"},{"line_number":43,"context_line":"        - name: Read the environment file from Kolla configuration path"},{"line_number":44,"context_line":"          set_fact:"},{"line_number":45,"context_line":"            kolla_environment: \"{{ lookup(\u0027file\u0027, kolla_config_path ~ \u0027/.environment\u0027) }}\""},{"line_number":46,"context_line":"        - name: Flag that the Kolla configuration path has been used by another environment"},{"line_number":47,"context_line":"          fail:"},{"line_number":48,"context_line":"            msg: \u003e"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"0d91a271_489ff256","line":45,"range":{"start_line":45,"start_character":12,"end_line":45,"end_character":90},"in_reply_to":"3526a757_426bb2d3","updated":"2021-03-30 10:47:01.000000000","message":"\u003e nit: could be a task variable, avoiding the block.\n\n+1 Would be good to avoid the extra task","commit_id":"7bcea5edc6e57dd82b386126821cf6f6001d95aa"},{"author":{"_account_id":15197,"name":"Pierre Riteau","email":"pierre@stackhpc.com","username":"priteau","status":"StackHPC"},"change_message_id":"a4a651431a7064589ecbc16679a3629b28923466","unresolved":true,"context_lines":[{"line_number":42,"context_line":"      block:"},{"line_number":43,"context_line":"        - name: Read the environment file from Kolla configuration path"},{"line_number":44,"context_line":"          set_fact:"},{"line_number":45,"context_line":"            kolla_environment: \"{{ lookup(\u0027file\u0027, kolla_config_path ~ \u0027/.environment\u0027) }}\""},{"line_number":46,"context_line":"        - name: Flag that the Kolla configuration path has been used by another environment"},{"line_number":47,"context_line":"          fail:"},{"line_number":48,"context_line":"            msg: \u003e"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"7be5979e_bcf542d6","line":45,"range":{"start_line":45,"start_character":12,"end_line":45,"end_character":90},"in_reply_to":"86c287cc_d6618ba2","updated":"2021-03-31 15:23:23.000000000","message":"It appears to work, thanks! I wrapped all the tasks into the existing block.","commit_id":"7bcea5edc6e57dd82b386126821cf6f6001d95aa"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"1d3947c0bdaaee662fee3b05be2b2475fd5876ea","unresolved":true,"context_lines":[{"line_number":42,"context_line":"      block:"},{"line_number":43,"context_line":"        - name: Read the environment file from Kolla configuration path"},{"line_number":44,"context_line":"          set_fact:"},{"line_number":45,"context_line":"            kolla_environment: \"{{ lookup(\u0027file\u0027, kolla_config_path ~ \u0027/.environment\u0027) }}\""},{"line_number":46,"context_line":"        - name: Flag that the Kolla configuration path has been used by another environment"},{"line_number":47,"context_line":"          fail:"},{"line_number":48,"context_line":"            msg: \u003e"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"86c287cc_d6618ba2","line":45,"range":{"start_line":45,"start_character":12,"end_line":45,"end_character":90},"in_reply_to":"b7fdc917_47d71504","updated":"2021-03-31 10:59:21.000000000","message":"I think this should work:\n\n        - name: Flag that the Kolla configuration path has been used by another environment\n          vars:\n            kolla_environment: \"{{ lookup(\u0027file\u0027, kolla_config_path ~ \u0027/.environment\u0027) }}\"\n          fail:\n            msg: \u003e\n              The Kolla configuration path at {{ kolla_config_path }} was\n              already used by environment {{ kolla_environment }}. You should\n              clean up this directory, including the environment file located\n              at {{ kolla_config_path ~ \u0027/.environment\u0027 }}, before running\n              Kayobe again.\n          when:\n            - kolla_environment !\u003d kayobe_environment\n            - kolla_environment_file.stat.exists\n          tags:\n            - config","commit_id":"7bcea5edc6e57dd82b386126821cf6f6001d95aa"}]}
