)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"8acc68aa8825f04f9dc009b9a48ac4ce9bf64660","unresolved":false,"context_lines":[{"line_number":11,"context_line":"openstack-ansible command) still take precidence."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: I86c95d3fb6f9d931093ff6622b25e814920940f6"},{"line_number":14,"context_line":"Fixes-Bug: 1624029"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7a8ec9b2_83b39ce8","line":14,"range":{"start_line":14,"start_character":0,"end_line":14,"end_character":9},"updated":"2016-09-15 18:20:00.000000000","message":"Closes-Bug","commit_id":"44c656097a4fb2eaafaf2d6c7a738519a12fbd8e"}],"scripts/upgrade-utilities/playbooks/user-secrets-adjustment.yml":[{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"229b9622355a5d4b9afb852d15ee46a7162dc296","unresolved":false,"context_lines":[{"line_number":19,"context_line":"  gather_facts: false"},{"line_number":20,"context_line":"  user: root"},{"line_number":21,"context_line":"  tasks:"},{"line_number":22,"context_line":"    - include_vars: defaults/main.yml"},{"line_number":23,"context_line":"    - name: Read example user secrets file"},{"line_number":24,"context_line":"      shell: \"grep \u0027^[a-zA-Z]\u0027 {{ playbook_dir }}/../../../etc/openstack_deploy/user_secrets.yml\""},{"line_number":25,"context_line":"      register: secrets"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"7a8ec9b2_ddc2e733","line":22,"updated":"2016-09-15 17:36:41.000000000","message":"at this point just using a vars: block below the tasks and specifying the single value there would be clearer and still be overridable wouldn\u0027t it?","commit_id":"1216d25b720d422cab538f85e8aa6bc507eb4fd4"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"b2cb4cea9f1625057b26bca8cb15a5ef1681d581","unresolved":false,"context_lines":[{"line_number":19,"context_line":"  gather_facts: false"},{"line_number":20,"context_line":"  user: root"},{"line_number":21,"context_line":"  tasks:"},{"line_number":22,"context_line":"    - include_vars: defaults/main.yml"},{"line_number":23,"context_line":"    - name: Read example user secrets file"},{"line_number":24,"context_line":"      shell: \"grep \u0027^[a-zA-Z]\u0027 {{ playbook_dir }}/../../../etc/openstack_deploy/user_secrets.yml\""},{"line_number":25,"context_line":"      register: secrets"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"7a8ec9b2_9d793fcb","line":22,"in_reply_to":"7a8ec9b2_ddc2e733","updated":"2016-09-15 17:43:01.000000000","message":"Yes, agreed - this is a good idea. In fact you can simply use a var with a default to a value that\u0027s known - so if the var isn\u0027t provided, it falls back to the default. Get rid of the defaults file with one entry in it.","commit_id":"1216d25b720d422cab538f85e8aa6bc507eb4fd4"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"a0f9427e79229ced07a1b98d9d7a34095f1f4087","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    - name: Generate new secrets"},{"line_number":32,"context_line":"      shell: \"{{ playbook_dir }}/../../../scripts/pw-token-gen.py --file /etc/openstack_deploy/{{ osa_secrets_file_name }}\""},{"line_number":33,"context_line":"  vars:"},{"line_number":34,"context_line":"    osa_secrets_file_name: {{ osa_secrets_file_name | default(user_secrets.yml) }}"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"7a8ec9b2_83447c1b","line":34,"range":{"start_line":34,"start_character":62,"end_line":34,"end_character":78},"updated":"2016-09-15 18:13:59.000000000","message":"This needs to be in quotes to be a string result.","commit_id":"b81e2feec1d1fecaf5a221161fc83e99de0862f6"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"84b2726e0b775739971ee64cebbe8fbe89dddd26","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    - name: Generate new secrets"},{"line_number":32,"context_line":"      shell: \"{{ playbook_dir }}/../../../scripts/pw-token-gen.py --file /etc/openstack_deploy/{{ osa_secrets_file_name }}\""},{"line_number":33,"context_line":"  vars:"},{"line_number":34,"context_line":"    osa_secrets_file_name: {{ osa_secrets_file_name | default(\"user_secrets.yml\") }}"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"7a8ec9b2_6397703a","line":34,"range":{"start_line":34,"start_character":27,"end_line":34,"end_character":84},"updated":"2016-09-15 18:19:24.000000000","message":"The value also needs to be quoted, so:\n\nosa_secrets_file_name: \"{{ osa_secrets_file_name | default(\u0027user_secrets.yml\u0027) }}\"\n\nNot sure if you can use the same name both times though - please test that in a playbook before doing this. Alternatively make the submitted var name something other than the var used in the playbook, for example:\n\n_secrets_file_name: \"{{ secrets_file_name | default(\u0027user_secrets.yml\u0027) }}\"\n\n... then adjust the playbook to use _secrets_file_name all the way through. This way there\u0027s no name clash anywhere and you\u0027re sure to be able to override it.","commit_id":"44c656097a4fb2eaafaf2d6c7a738519a12fbd8e"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"225d541955bcc713c959dcc7640ea12c9896aeec","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        if ! grep \u0027^{{ item }}\u0027 /etc/openstack_deploy/{{ _osa_secrets_file_name }}; then"},{"line_number":28,"context_line":"          echo {{ item }} | tee -a /etc/openstack_deploy/{{ _osa_secrets_file_name }}"},{"line_number":29,"context_line":"        fi"},{"line_number":30,"context_line":"      with_items: secrets.stdout_lines"},{"line_number":31,"context_line":"    - name: Generate new secrets"},{"line_number":32,"context_line":"      shell: \"{{ playbook_dir }}/../../../scripts/pw-token-gen.py --file /etc/openstack_deploy/{{ _osa_secrets_file_name }}\""},{"line_number":33,"context_line":"  vars:"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"7a8ec9b2_7810fe59","line":30,"updated":"2016-09-15 18:55:18.000000000","message":"nit: don\u0027t need with_items for one item","commit_id":"2ec74e9d8a012673bdad9343e5f9931f89bb8faa"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"092e025e96e4b86faf5603f6f413b44c23dd9882","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        if ! grep \u0027^{{ item }}\u0027 /etc/openstack_deploy/{{ _osa_secrets_file_name }}; then"},{"line_number":28,"context_line":"          echo {{ item }} | tee -a /etc/openstack_deploy/{{ _osa_secrets_file_name }}"},{"line_number":29,"context_line":"        fi"},{"line_number":30,"context_line":"      with_items: secrets.stdout_lines"},{"line_number":31,"context_line":"    - name: Generate new secrets"},{"line_number":32,"context_line":"      shell: \"{{ playbook_dir }}/../../../scripts/pw-token-gen.py --file /etc/openstack_deploy/{{ _osa_secrets_file_name }}\""},{"line_number":33,"context_line":"  vars:"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"7a8ec9b2_09e6ca43","line":30,"in_reply_to":"7a8ec9b2_7810fe59","updated":"2016-09-15 19:41:07.000000000","message":"The items are the contents of the secrets file. :)","commit_id":"2ec74e9d8a012673bdad9343e5f9931f89bb8faa"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"225d541955bcc713c959dcc7640ea12c9896aeec","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        fi"},{"line_number":30,"context_line":"      with_items: secrets.stdout_lines"},{"line_number":31,"context_line":"    - name: Generate new secrets"},{"line_number":32,"context_line":"      shell: \"{{ playbook_dir }}/../../../scripts/pw-token-gen.py --file /etc/openstack_deploy/{{ _osa_secrets_file_name }}\""},{"line_number":33,"context_line":"  vars:"},{"line_number":34,"context_line":"    _osa_secrets_file_name: \"{{ osa_secrets_file_name | default(\u0027user_secrets.yml\u0027) }}\""}],"source_content_type":"text/x-yaml","patch_set":7,"id":"7a8ec9b2_f856ce28","line":32,"range":{"start_line":32,"start_character":6,"end_line":32,"end_character":11},"updated":"2016-09-15 18:55:18.000000000","message":"nit: command would work here and is preferred.","commit_id":"2ec74e9d8a012673bdad9343e5f9931f89bb8faa"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"092e025e96e4b86faf5603f6f413b44c23dd9882","unresolved":false,"context_lines":[{"line_number":29,"context_line":"        fi"},{"line_number":30,"context_line":"      with_items: secrets.stdout_lines"},{"line_number":31,"context_line":"    - name: Generate new secrets"},{"line_number":32,"context_line":"      shell: \"{{ playbook_dir }}/../../../scripts/pw-token-gen.py --file /etc/openstack_deploy/{{ _osa_secrets_file_name }}\""},{"line_number":33,"context_line":"  vars:"},{"line_number":34,"context_line":"    _osa_secrets_file_name: \"{{ osa_secrets_file_name | default(\u0027user_secrets.yml\u0027) }}\""}],"source_content_type":"text/x-yaml","patch_set":7,"id":"7a8ec9b2_e9c35e87","line":32,"range":{"start_line":32,"start_character":6,"end_line":32,"end_character":11},"in_reply_to":"7a8ec9b2_f856ce28","updated":"2016-09-15 19:41:07.000000000","message":"We should actually probably be specific about the shell used too, but I think it\u0027s OK as-is. I\u0027m not sure that command would work, but it might.","commit_id":"2ec74e9d8a012673bdad9343e5f9931f89bb8faa"}]}
