)]}'
{"roles/tripleo-hieradata/tasks/main.yaml":[{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"7162d0459f3749eca06e8c7330d0ad6be5cd7ed6","unresolved":false,"context_lines":[{"line_number":57,"context_line":"- name: Copy hieradata files per host"},{"line_number":58,"context_line":"  when: hieradata_per_host|bool"},{"line_number":59,"context_line":"  include: per_host.yaml host\u003d{{ item }} data\u003d{{ hieradata_content[item] }}"},{"line_number":60,"context_line":"  loop: \"{{ hosts }}\""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"9fb8cfa7_fd698ff8","line":60,"range":{"start_line":60,"start_character":12,"end_line":60,"end_character":17},"updated":"2019-06-08 12:29:32.000000000","message":"I need to loop over the inventory host per group. I forgot to add the yaml for that, will do Monday","commit_id":"059a731334bcee4ff90070ebe7cadffd30780f13"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"2c3f60663bb00cab0c238aa4634d80743ff5f057","unresolved":false,"context_lines":[{"line_number":26,"context_line":"# other_hierafile:"},{"line_number":27,"context_line":"#   foo: bar3"},{"line_number":28,"context_line":"- name: Copy hieradata files"},{"line_number":29,"context_line":"  when: not hieradata_per_host|bool"},{"line_number":30,"context_line":"  copy:"},{"line_number":31,"context_line":"    dest: /etc/puppet/hieradata/{{ item.key }}.json"},{"line_number":32,"context_line":"    mode: 0600"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"9fb8cfa7_1ccec02c","line":29,"updated":"2019-06-11 14:23:31.000000000","message":"the \"when\" statement is evaluated after the loop is expanded.\n\nin this case, the loop expansion fails because there is no datafiles key in hieradata_content so the dict2items filter then fails.\n\nyou\u0027ll need to put these tasks each in their own block and then put the \"when\" statement at the block level.","commit_id":"b5025a792fd28de4d915a0e51f89594991ff5c47"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"8016f5fe19ad32b6b29ffaf165eca11f10a60132","unresolved":false,"context_lines":[{"line_number":26,"context_line":"# other_hierafile:"},{"line_number":27,"context_line":"#   foo: bar3"},{"line_number":28,"context_line":"- name: Copy hieradata files"},{"line_number":29,"context_line":"  when: not hieradata_per_host|bool"},{"line_number":30,"context_line":"  copy:"},{"line_number":31,"context_line":"    dest: /etc/puppet/hieradata/{{ item.key }}.json"},{"line_number":32,"context_line":"    mode: 0600"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"9fb8cfa7_bf168648","line":29,"in_reply_to":"9fb8cfa7_1ccec02c","updated":"2019-06-11 14:36:14.000000000","message":"a different thing to do would be to split this tasks file up into different files depending on how you want to use the role.\n\nFor example, we could have:\n\nmain.yaml (common tasks)\nall_hosts.yaml (create hieradata for all nodes)\nper_host.yaml (create hieradata for single host)\n\nit might make more sense because i want to another mode of behavior where you use a role template to create the hieradata also","commit_id":"b5025a792fd28de4d915a0e51f89594991ff5c47"},{"author":{"_account_id":3153,"name":"Emilien Macchi","email":"emilien@redhat.com","username":"emilienm"},"change_message_id":"9f7eec5a4f450b14a127df159b01e491ce4bd985","unresolved":false,"context_lines":[{"line_number":26,"context_line":"# other_hierafile:"},{"line_number":27,"context_line":"#   foo: bar3"},{"line_number":28,"context_line":"- name: Copy hieradata files"},{"line_number":29,"context_line":"  when: not hieradata_per_host|bool"},{"line_number":30,"context_line":"  copy:"},{"line_number":31,"context_line":"    dest: /etc/puppet/hieradata/{{ item.key }}.json"},{"line_number":32,"context_line":"    mode: 0600"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"9fb8cfa7_7234c593","line":29,"in_reply_to":"9fb8cfa7_bf168648","updated":"2019-06-11 15:34:53.000000000","message":"yes i\u0027ll split into different files","commit_id":"b5025a792fd28de4d915a0e51f89594991ff5c47"},{"author":{"_account_id":7144,"name":"James Slagle","email":"jslagle@redhat.com","username":"slagle"},"change_message_id":"be8afff1143edc1fa5672248aeddb6fbca02d4f5","unresolved":false,"context_lines":[{"line_number":56,"context_line":"#     foo: bar"},{"line_number":57,"context_line":"- name: Copy hieradata files per host"},{"line_number":58,"context_line":"  when: hieradata_per_host|bool"},{"line_number":59,"context_line":"  include: per_host.yaml host\u003d{{ item }} data\u003d{{ hieradata_content[item] }}"},{"line_number":60,"context_line":"  loop: \"{{ groups[tripleo_role_name] }}\""}],"source_content_type":"text/x-yaml","patch_set":2,"id":"9fb8cfa7_7f8a4e6a","line":59,"updated":"2019-06-11 14:45:32.000000000","message":"i don\u0027t see hieradata_content defined anywhere","commit_id":"b5025a792fd28de4d915a0e51f89594991ff5c47"}]}
