)]}'
{"roles/create-clouds-yaml-file/README.rst":[{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"dd819cc86d26cdd41f941f32aa1b7f229f4459ea","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"Source credentials and create a clouds.yaml file. If the clouds.yaml"},{"line_number":4,"context_line":"file in the defined location exists, it will be overwritten."},{"line_number":5,"context_line":"Note: If there is a file in /etc/ called openstack and it\u0027s not"},{"line_number":6,"context_line":"a directory, it will be removed and directory called openstack"},{"line_number":7,"context_line":"will be created."},{"line_number":8,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"bf659307_25a8c775","line":5,"updated":"2018-04-05 17:01:32.000000000","message":"This comment is relevant only if clouds_file_path is the default value.","commit_id":"07908d6424817cb02604ddc03d21ff3aa5165cc7"}],"roles/create-clouds-yaml-file/tasks/main.yaml":[{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"b151c75999db524a960f293c8450eb429e2ebf02","unresolved":false,"context_lines":[{"line_number":2,"context_line":"    shell: |"},{"line_number":3,"context_line":"      for key in $( set | awk \u0027{FS\u003d\"\u003d\"}  /^OS_/ {print $1}\u0027 ); do unset $key ; done"},{"line_number":4,"context_line":"      source {{ source_credentials_commands }}"},{"line_number":5,"context_line":"      echo -n \"{{cloudname}}: \\"},{"line_number":6,"context_line":"        {\u0027auth\u0027: \\"},{"line_number":7,"context_line":"          { \u0027auth-url\u0027: \u0027$OS_AUTH_URL\u0027, \\"},{"line_number":8,"context_line":"            \u0027username\u0027: \u0027$OS_USERNAME\u0027, \\"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_5e9d9308","line":5,"updated":"2018-04-05 11:27:50.000000000","message":"I wonder if this can be simplified by breaking it into two parts:\n- a first task which only source the shell file with the OS_ variables and converts them into some proper ansible variable format\n- a second task which defines the structure of auth: and its subkeys, using the variables found previously.\nThat should be a bit more robust, but... not pushing it too much","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"e3cc059b305009f476d5f034235d267234917102","unresolved":false,"context_lines":[{"line_number":2,"context_line":"    shell: |"},{"line_number":3,"context_line":"      for key in $( set | awk \u0027{FS\u003d\"\u003d\"}  /^OS_/ {print $1}\u0027 ); do unset $key ; done"},{"line_number":4,"context_line":"      source {{ source_credentials_commands }}"},{"line_number":5,"context_line":"      echo -n \"{{cloudname}}: \\"},{"line_number":6,"context_line":"        {\u0027auth\u0027: \\"},{"line_number":7,"context_line":"          { \u0027auth-url\u0027: \u0027$OS_AUTH_URL\u0027, \\"},{"line_number":8,"context_line":"            \u0027username\u0027: \u0027$OS_USERNAME\u0027, \\"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_c41794a3","line":5,"in_reply_to":"bf659307_44d8647e","updated":"2018-04-05 12:55:46.000000000","message":"Any solution that I had in mind requires more debugging time, I concur.","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"8e5e958281f4e9d19604b81ccd26929e953084b5","unresolved":false,"context_lines":[{"line_number":2,"context_line":"    shell: |"},{"line_number":3,"context_line":"      for key in $( set | awk \u0027{FS\u003d\"\u003d\"}  /^OS_/ {print $1}\u0027 ); do unset $key ; done"},{"line_number":4,"context_line":"      source {{ source_credentials_commands }}"},{"line_number":5,"context_line":"      echo -n \"{{cloudname}}: \\"},{"line_number":6,"context_line":"        {\u0027auth\u0027: \\"},{"line_number":7,"context_line":"          { \u0027auth-url\u0027: \u0027$OS_AUTH_URL\u0027, \\"},{"line_number":8,"context_line":"            \u0027username\u0027: \u0027$OS_USERNAME\u0027, \\"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_992905f4","line":5,"in_reply_to":"bf659307_5e9d9308","updated":"2018-04-05 12:09:37.000000000","message":"I can try to split it up.","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"c5184fb3b21a57e5ba6977fb312adc42777a25aa","unresolved":false,"context_lines":[{"line_number":2,"context_line":"    shell: |"},{"line_number":3,"context_line":"      for key in $( set | awk \u0027{FS\u003d\"\u003d\"}  /^OS_/ {print $1}\u0027 ); do unset $key ; done"},{"line_number":4,"context_line":"      source {{ source_credentials_commands }}"},{"line_number":5,"context_line":"      echo -n \"{{cloudname}}: \\"},{"line_number":6,"context_line":"        {\u0027auth\u0027: \\"},{"line_number":7,"context_line":"          { \u0027auth-url\u0027: \u0027$OS_AUTH_URL\u0027, \\"},{"line_number":8,"context_line":"            \u0027username\u0027: \u0027$OS_USERNAME\u0027, \\"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_44d8647e","line":5,"in_reply_to":"bf659307_992905f4","updated":"2018-04-05 12:40:58.000000000","message":"Actually I don\u0027t see a way, how to split it in an efficient way.\n - I can just split without any other changes, but then, we will save only first two lines and the echo command will be as it is.\n - Or, I could change the echo part logic, but it would require more debug time, this command already works, because I copied it from a different playbook :D","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"b151c75999db524a960f293c8450eb429e2ebf02","unresolved":false,"context_lines":[{"line_number":29,"context_line":"      path: \"{{ clouds_path | dirname}}\""},{"line_number":30,"context_line":"      state: directory"},{"line_number":31,"context_line":"      mode: 0666"},{"line_number":32,"context_line":"    when: not folder_stat.stat.exists or (folder_stat.stat.exists and not folder_stat.stat.isdir)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"  - name: Create clouds.yaml if doesn\u0027t exist"},{"line_number":35,"context_line":"    become: yes"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_1ec4fb91","line":32,"updated":"2018-04-05 11:27:50.000000000","message":"Is the check really needed?\nIf the directory exists, the operation should be a noop (idempotency)","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"8e5e958281f4e9d19604b81ccd26929e953084b5","unresolved":false,"context_lines":[{"line_number":29,"context_line":"      path: \"{{ clouds_path | dirname}}\""},{"line_number":30,"context_line":"      state: directory"},{"line_number":31,"context_line":"      mode: 0666"},{"line_number":32,"context_line":"    when: not folder_stat.stat.exists or (folder_stat.stat.exists and not folder_stat.stat.isdir)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"  - name: Create clouds.yaml if doesn\u0027t exist"},{"line_number":35,"context_line":"    become: yes"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_791191ac","line":32,"in_reply_to":"bf659307_1ec4fb91","updated":"2018-04-05 12:09:37.000000000","message":"Don\u0027t know, maybe I just had too much caffeine in my blood when I was writing the condition :D, but what if there is a file called the same as the directory I want to create? Therefor I added the second condition, where the file exists and it\u0027s not a directory ..","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"e3cc059b305009f476d5f034235d267234917102","unresolved":false,"context_lines":[{"line_number":29,"context_line":"      path: \"{{ clouds_path | dirname}}\""},{"line_number":30,"context_line":"      state: directory"},{"line_number":31,"context_line":"      mode: 0666"},{"line_number":32,"context_line":"    when: not folder_stat.stat.exists or (folder_stat.stat.exists and not folder_stat.stat.isdir)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"  - name: Create clouds.yaml if doesn\u0027t exist"},{"line_number":35,"context_line":"    become: yes"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_a412a0b3","line":32,"in_reply_to":"bf659307_64a9e88e","updated":"2018-04-05 12:55:46.000000000","message":"But if a file (not directory) with that name exists, the command will return an error.","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"016ce92e5714168eb231db166ab914f2f0082689","unresolved":false,"context_lines":[{"line_number":29,"context_line":"      path: \"{{ clouds_path | dirname}}\""},{"line_number":30,"context_line":"      state: directory"},{"line_number":31,"context_line":"      mode: 0666"},{"line_number":32,"context_line":"    when: not folder_stat.stat.exists or (folder_stat.stat.exists and not folder_stat.stat.isdir)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"  - name: Create clouds.yaml if doesn\u0027t exist"},{"line_number":35,"context_line":"    become: yes"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_e433b8f5","line":32,"in_reply_to":"bf659307_791191ac","updated":"2018-04-05 12:22:45.000000000","message":"something like:\n\n    - file:\n        path: /tmp/thisisatest\n        state: absent\n    - file:\n        path: /tmp/thisisatest\n        mode: 0755\n        state: directory","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"be4dfa8477221238b6c627c56f86b7ec4534d320","unresolved":false,"context_lines":[{"line_number":29,"context_line":"      path: \"{{ clouds_path | dirname}}\""},{"line_number":30,"context_line":"      state: directory"},{"line_number":31,"context_line":"      mode: 0666"},{"line_number":32,"context_line":"    when: not folder_stat.stat.exists or (folder_stat.stat.exists and not folder_stat.stat.isdir)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"  - name: Create clouds.yaml if doesn\u0027t exist"},{"line_number":35,"context_line":"    become: yes"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_ff17c144","line":32,"in_reply_to":"bf659307_a412a0b3","updated":"2018-04-05 13:12:50.000000000","message":"oh, I forgot about the fact, there can\u0027t be a file and a directory with the same name at the same location.\nI see two options:\n1. There shouldn\u0027t be a file named openstack, if it is, let\u0027s end up with error\n2. Or we can create that file under user: ~/.config/openstack/ - there we have the same problem, but it\u0027s not a system directory","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"c5184fb3b21a57e5ba6977fb312adc42777a25aa","unresolved":false,"context_lines":[{"line_number":29,"context_line":"      path: \"{{ clouds_path | dirname}}\""},{"line_number":30,"context_line":"      state: directory"},{"line_number":31,"context_line":"      mode: 0666"},{"line_number":32,"context_line":"    when: not folder_stat.stat.exists or (folder_stat.stat.exists and not folder_stat.stat.isdir)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"  - name: Create clouds.yaml if doesn\u0027t exist"},{"line_number":35,"context_line":"    become: yes"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_64a9e88e","line":32,"in_reply_to":"bf659307_e433b8f5","updated":"2018-04-05 12:40:58.000000000","message":"- file:\n    path: /tmp/thisisatest\n    mode: 0755\n    state: directory\n\naccording the doc, this should create the directory only if it doesn\u0027t exists, so there\u0027s no check needed cause there\u0027s no problem","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"afa5d79bd82bcaf5787fd72f29f6139a9fdd60bd","unresolved":false,"context_lines":[{"line_number":29,"context_line":"      path: \"{{ clouds_path | dirname}}\""},{"line_number":30,"context_line":"      state: directory"},{"line_number":31,"context_line":"      mode: 0666"},{"line_number":32,"context_line":"    when: not folder_stat.stat.exists or (folder_stat.stat.exists and not folder_stat.stat.isdir)"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"  - name: Create clouds.yaml if doesn\u0027t exist"},{"line_number":35,"context_line":"    become: yes"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_3faa19d2","line":32,"in_reply_to":"bf659307_ff17c144","updated":"2018-04-05 13:21:00.000000000","message":"If there is a file named like a directory, the user of the role expects to have a directory with that name, I think. Can\u0027t the code just remove the file?","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"dd819cc86d26cdd41f941f32aa1b7f229f4459ea","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  - debug:"},{"line_number":19,"context_line":"      msg: \"{{ cloud_details }}\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"  - name: Check if the file exists"},{"line_number":22,"context_line":"    stat:"},{"line_number":23,"context_line":"      path: \"{{ clouds_file_path | dirname}}\""},{"line_number":24,"context_line":"    register: folder_stat"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"bf659307_e5bbafc1","line":21,"updated":"2018-04-05 17:01:32.000000000","message":"But you don\u0027t need to check if the file exists - just remove it.","commit_id":"07908d6424817cb02604ddc03d21ff3aa5165cc7"},{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"dd819cc86d26cdd41f941f32aa1b7f229f4459ea","unresolved":false,"context_lines":[{"line_number":37,"context_line":"      path: \"{{ clouds_file_path | dirname}}\""},{"line_number":38,"context_line":"      state: directory"},{"line_number":39,"context_line":"      mode: 0666"},{"line_number":40,"context_line":"    when: not folder_stat.stat.exists or file_deleted.changed"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"  - name: Create clouds.yaml if doesn\u0027t exist"},{"line_number":43,"context_line":"    become: yes"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"bf659307_a5b5b7cf","line":40,"updated":"2018-04-05 17:01:32.000000000","message":"Same here: just remove the file (if exists) and create it again (as directory). It should work in all cases.","commit_id":"07908d6424817cb02604ddc03d21ff3aa5165cc7"},{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"2010a04bd0005bcd1746bb7c9a1caebd7c330298","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    file:"},{"line_number":30,"context_line":"      path: \"{{ clouds_file_path | dirname}}\""},{"line_number":31,"context_line":"      state: directory"},{"line_number":32,"context_line":"      mode: 0666"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"  - name: Create clouds.yaml"},{"line_number":35,"context_line":"    become: yes"}],"source_content_type":"text/x-yaml","patch_set":6,"id":"bf659307_c1de66d9","line":32,"updated":"2018-04-09 14:34:15.000000000","message":"I did not notice before: 0666 for a directory is not the right permission - it should have the x permission, so 0700, 0755, or 0711 (depending on your needs)","commit_id":"d89beadccd9d3d70ae385aac575f4a05c0e5ab8b"}],"roles/edit-clouds-yaml-file/README.rst":[{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"b151c75999db524a960f293c8450eb429e2ebf02","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"**Role Variables**"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":".. zuul:rolevar:: clouds_path"},{"line_number":10,"context_line":"   :type: string"},{"line_number":11,"context_line":"   :default: /etc/openstack/clouds.yaml"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"bf659307_1e871bb9","line":9,"updated":"2018-04-05 11:27:50.000000000","message":"clouds_path or clouds_file_path?","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"8e5e958281f4e9d19604b81ccd26929e953084b5","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"**Role Variables**"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":".. zuul:rolevar:: clouds_path"},{"line_number":10,"context_line":"   :type: string"},{"line_number":11,"context_line":"   :default: /etc/openstack/clouds.yaml"},{"line_number":12,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"bf659307_19541554","line":9,"in_reply_to":"bf659307_1e871bb9","updated":"2018-04-05 12:09:37.000000000","message":"clouds_file_path sounds better, I\u0027ll rename it.","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"}],"roles/edit-clouds-yaml-file/tasks/main.yaml":[{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"b151c75999db524a960f293c8450eb429e2ebf02","unresolved":false,"context_lines":[{"line_number":1,"context_line":"  - name: Cat clouds.yaml file"},{"line_number":2,"context_line":"    shell: |"},{"line_number":3,"context_line":"        set -ex"},{"line_number":4,"context_line":"        cat {{ clouds_path }}"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_dea9a324","line":1,"updated":"2018-04-05 11:27:50.000000000","message":"isn\u0027t the name of this role a bit too generic? When I read edit-clouds-yaml-file I imagine it as a role useful to change a generic value inside the clouds file. This is more a specific role to workaround some values.","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":10459,"name":"Luigi Toscano","email":"ltoscano@redhat.com","username":"ltoscano"},"change_message_id":"016ce92e5714168eb231db166ab914f2f0082689","unresolved":false,"context_lines":[{"line_number":1,"context_line":"  - name: Cat clouds.yaml file"},{"line_number":2,"context_line":"    shell: |"},{"line_number":3,"context_line":"        set -ex"},{"line_number":4,"context_line":"        cat {{ clouds_path }}"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_d9577d26","line":1,"in_reply_to":"bf659307_59e84d7b","updated":"2018-04-05 12:22:45.000000000","message":"or tempestconf-workaround-auth-url, or something like that.","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"8e5e958281f4e9d19604b81ccd26929e953084b5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"  - name: Cat clouds.yaml file"},{"line_number":2,"context_line":"    shell: |"},{"line_number":3,"context_line":"        set -ex"},{"line_number":4,"context_line":"        cat {{ clouds_path }}"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"bf659307_59e84d7b","line":1,"in_reply_to":"bf659307_dea9a324","updated":"2018-04-05 12:09:37.000000000","message":"You\u0027re right, but I can\u0027t think about something different.\n - devstack_workaround is too generic as well\n - workaround_auth_url maybe?","commit_id":"cc93ef545412111947fd562a1ac37203b614a9ca"}]}
