)]}'
{"roles/use-cached-repos/tasks/main.yaml":[{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"f44e1d64fc6bd2e7b33556bdd851f367423df458","unresolved":false,"context_lines":[{"line_number":2,"context_line":"  stat:"},{"line_number":3,"context_line":"    path: \"/opt/git/{{ item.name }}\""},{"line_number":4,"context_line":"  with_items: \"{{ zuul.projects }}\""},{"line_number":5,"context_line":"  delegate_to: localhost"},{"line_number":6,"context_line":"  register: cached_repos"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"- name: Clone cached repo to workspace"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"7f287b81_76491db5","line":5,"updated":"2017-08-29 23:35:09.000000000","message":"I believe that wants to not delegate_to localhost - it wants to run on the node.","commit_id":"8b380dc26bf2762457fdd0056038e27e12bca64e"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"d30279ec981723f4f3062364dec5b90914e6fc6c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"  with_items: \"{{ zuul.projects }}\""},{"line_number":5,"context_line":"  register: cached_repos"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"- name: Clone cached repo to workspace"},{"line_number":8,"context_line":"  command: \"git clone /opt/git/{{ item.0.name }} {{ ansible_user_dir }}/{{ item.0.src_dir}}\""},{"line_number":9,"context_line":"  creates: \"{{ ansible_user_dir }}/{{ item.0.src_dir}}\""},{"line_number":10,"context_line":"  when: item.1.stat.exists"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"7f287b81_51a18bf7","line":7,"updated":"2017-08-29 23:50:48.000000000","message":"src/git.openstack.org/openstack-infra won\u0027t exist before this clone, so you need a mkdir -p (or file: state: directory) on dirname(item.src_dir) with_items: zuul.projects","commit_id":"0d94dbf838e55024484cb76497145da92d9416b1"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"b4c1e78f41ad6c8a4a61c3bf6034b1c7fad45034","unresolved":false,"context_lines":[{"line_number":4,"context_line":"  with_items: \"{{ zuul.projects }}\""},{"line_number":5,"context_line":"  register: cached_repos"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"- name: Clone cached repo to workspace"},{"line_number":8,"context_line":"  command: \"git clone /opt/git/{{ item.0.name }} {{ ansible_user_dir }}/{{ item.0.src_dir}}\""},{"line_number":9,"context_line":"  creates: \"{{ ansible_user_dir }}/{{ item.0.src_dir}}\""},{"line_number":10,"context_line":"  when: item.1.stat.exists"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"7f287b81_f1b19748","line":7,"in_reply_to":"7f287b81_51a18bf7","updated":"2017-08-29 23:51:08.000000000","message":"I\u0027m wrong!","commit_id":"0d94dbf838e55024484cb76497145da92d9416b1"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"e5b33f1a5665dd08ac8573c31725f9375284d24a","unresolved":false,"context_lines":[{"line_number":11,"context_line":"  with_together:"},{"line_number":12,"context_line":"    - \" {{ zuul.projects }}\""},{"line_number":13,"context_line":"    - \" {{ cached_repos }}\""},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- name: Clone upstream repo to workspace"},{"line_number":16,"context_line":"  command: \"git clone https://{{ item.0.canonical_hostname }}/{{ item.0.name}} {{ ansible_user_dir }}/{{ item.0.src_dir}}\""},{"line_number":17,"context_line":"  creates: \"{{ ansible_user_dir }}/{{ item.0.src_dir}}\""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"7f287b81_f16f5728","line":14,"updated":"2017-08-30 00:22:21.000000000","message":"Indeed.  Perhaps we should use bash or python.  :)","commit_id":"0d94dbf838e55024484cb76497145da92d9416b1"},{"author":{"_account_id":9061,"name":"David Moreau Simard","email":"moi@dmsimard.com","username":"dmsimard"},"change_message_id":"1afb70fe763623c6bc408cfdcdc4b3991ad71514","unresolved":false,"context_lines":[{"line_number":11,"context_line":"  with_together:"},{"line_number":12,"context_line":"    - \" {{ zuul.projects }}\""},{"line_number":13,"context_line":"    - \" {{ cached_repos }}\""},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- name: Clone upstream repo to workspace"},{"line_number":16,"context_line":"  command: \"git clone https://{{ item.0.canonical_hostname }}/{{ item.0.name}} {{ ansible_user_dir }}/{{ item.0.src_dir}}\""},{"line_number":17,"context_line":"  creates: \"{{ ansible_user_dir }}/{{ item.0.src_dir}}\""}],"source_content_type":"text/x-yaml","patch_set":4,"id":"7f287b81_7192474e","line":14,"updated":"2017-08-30 00:19:12.000000000","message":"What bothers me here is that we\u0027re iterating through a potentially large list *three* times.\nTwice for clones, once for removing the origin.\n\nThe following unique task would iterate through the list once while achieving the same purpose:\n\n    - name: Ensure repositories are in the workspace\n      command: \u003e-\n        {% if item.1.stat.exists -%}\n        git clone /opt/git/{{ item.0.name }} {{ ansible_user_dir }}/{{ item.0.src_dir }}\n        {% else -%}\n        git clone https://{{ item.0.canonical_hostname }}/{{ item.0.name }} {{ ansible_user_dir }}/{{ item.0.src_dir }}\n        {% endif %}\n        git --git-dir\u003d{{ ansible_user_dir }}/{{ item.0.src_dir}}/.git remote rm origin\n      creates: \"{{ ansible_user_dir }}/{{ item.0.src_dir }}\"\n      with_together:\n        - \"{{ zuul.projects }}\"\n        - \"{{ cached_repos }}\"","commit_id":"0d94dbf838e55024484cb76497145da92d9416b1"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"e5b33f1a5665dd08ac8573c31725f9375284d24a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    - \" {{ cached_repos }}\""},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- name: Clone upstream repo to workspace"},{"line_number":16,"context_line":"  command: \"git clone https://{{ item.0.canonical_hostname }}/{{ item.0.name}} {{ ansible_user_dir }}/{{ item.0.src_dir}}\""},{"line_number":17,"context_line":"  creates: \"{{ ansible_user_dir }}/{{ item.0.src_dir}}\""},{"line_number":18,"context_line":"  when: not item.1.stat.exists"},{"line_number":19,"context_line":"  with_together:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"7f287b81_d16a1b18","line":16,"updated":"2017-08-30 00:22:21.000000000","message":"For openstack, yes (the current target of this role).  More thought is needed to generalize it into zuul-jobs.","commit_id":"0d94dbf838e55024484cb76497145da92d9416b1"},{"author":{"_account_id":9061,"name":"David Moreau Simard","email":"moi@dmsimard.com","username":"dmsimard"},"change_message_id":"1afb70fe763623c6bc408cfdcdc4b3991ad71514","unresolved":false,"context_lines":[{"line_number":13,"context_line":"    - \" {{ cached_repos }}\""},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"- name: Clone upstream repo to workspace"},{"line_number":16,"context_line":"  command: \"git clone https://{{ item.0.canonical_hostname }}/{{ item.0.name}} {{ ansible_user_dir }}/{{ item.0.src_dir}}\""},{"line_number":17,"context_line":"  creates: \"{{ ansible_user_dir }}/{{ item.0.src_dir}}\""},{"line_number":18,"context_line":"  when: not item.1.stat.exists"},{"line_number":19,"context_line":"  with_together:"}],"source_content_type":"text/x-yaml","patch_set":4,"id":"7f287b81_f1a517a3","line":16,"range":{"start_line":16,"start_character":22,"end_line":16,"end_character":27},"updated":"2017-08-30 00:19:12.000000000","message":"Is it a safe assumption that this will always be over https ?","commit_id":"0d94dbf838e55024484cb76497145da92d9416b1"}]}
