)]}'
{"tasks/container_create.yml":[{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"1ecff3e64165a5a6be7491693748021b50830dca","unresolved":false,"context_lines":[{"line_number":16,"context_line":"- name: Read custom facts from previous runs"},{"line_number":17,"context_line":"  setup:"},{"line_number":18,"context_line":"      filter: ansible_local"},{"line_number":19,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"- name: Check for lxc volume group"},{"line_number":22,"context_line":"  shell: \"(which vgs \u003e /dev/null \u0026\u0026 vgs | grep -o \u0027{{ lxc_container_vg_name }}\u0027) || false\""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3f044301_c318cc82","line":19,"updated":"2017-05-04 16:36:14.000000000","message":"I\u0027m not sure we need to setup twice, once before it\u0027s usage and after the generation should be good.\n\nOr trigger the setup if the generated file changed (register: on the generation + setup: when: \u003cregistervar\u003e | changed).","commit_id":"4b8c40025a948b3b21acdf226300a954ac06575e"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"03ef992a1889fbabbceda909e23896fb182e69e6","unresolved":false,"context_lines":[{"line_number":16,"context_line":"- name: Read custom facts from previous runs"},{"line_number":17,"context_line":"  setup:"},{"line_number":18,"context_line":"      filter: ansible_local"},{"line_number":19,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"- name: Check for lxc volume group"},{"line_number":22,"context_line":"  shell: \"(which vgs \u003e /dev/null \u0026\u0026 vgs | grep -o \u0027{{ lxc_container_vg_name }}\u0027) || false\""}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3f044301_87cf697e","line":19,"in_reply_to":"3f044301_c318cc82","updated":"2017-05-04 19:37:53.000000000","message":"I might be missing something - this is doing it before the generation and after. I put this one at the top so that the facts would be available for the whole task file. That way, should we register more facts in the future, we can use their existence in conditionals before redoing more work.\n\nI did also think about some sort of register step, but I think for the moment I\u0027ll leave it out of this particular patch and we can add that later.","commit_id":"4b8c40025a948b3b21acdf226300a954ac06575e"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"1ecff3e64165a5a6be7491693748021b50830dca","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        for i in {1..6}; do"},{"line_number":213,"context_line":"          echo -n ${hexchars:$(( $RANDOM % 16 )):1}"},{"line_number":214,"context_line":"        done | sed -e \u0027s/\\(..\\)/:\\1/g\u0027"},{"line_number":215,"context_line":"      )\" \u003e /var/lib/lxc/{{ inventory_hostname }}/{{ item.value.interface }}.hwaddr"},{"line_number":216,"context_line":"  args:"},{"line_number":217,"context_line":"    executable: /bin/bash"},{"line_number":218,"context_line":"    creates: \"/var/lib/lxc/{{ inventory_hostname }}/{{ item.value.interface }}.hwaddr\""},{"line_number":219,"context_line":"  with_dict: \"{{ container_networks | default({}) }}\""},{"line_number":220,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":221,"context_line":"  when:"},{"line_number":222,"context_line":"    - lxc_container_fixed_mac | bool"},{"line_number":223,"context_line":"  tags:"},{"line_number":224,"context_line":"    - lxc_container_create-networks"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"- name: Gather hardware addresses to be used as facts"},{"line_number":227,"context_line":"  command: cat /var/lib/lxc/{{ inventory_hostname }}/{{ item.value.interface }}.hwaddr"},{"line_number":228,"context_line":"  changed_when: false"},{"line_number":229,"context_line":"  register: macs"},{"line_number":230,"context_line":"  with_dict: \"{{ container_networks | default({}) }}\""},{"line_number":231,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":232,"context_line":"  when:"},{"line_number":233,"context_line":"    - lxc_container_fixed_mac | bool"},{"line_number":234,"context_line":"  tags:"},{"line_number":235,"context_line":"    - lxc_container_create-networks"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"# NOTE(cloudnull): To dynamically set the the mac address \"facts\" Ansible line format is being used"},{"line_number":238,"context_line":"- name: Set fixed hardware address fact"},{"line_number":239,"context_line":"  set_fact: \"{{item.item.value.interface }}_mac_address\u003d{{ item.stdout }}\""},{"line_number":240,"context_line":"  with_items:"},{"line_number":241,"context_line":"    - \"{{ macs.results }}\""},{"line_number":242,"context_line":"  when:"},{"line_number":243,"context_line":"    - lxc_container_fixed_mac | bool"},{"line_number":244,"context_line":"  tags:"},{"line_number":245,"context_line":"    - lxc_container_create-networks"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"- name: Write container MACs as local facts"},{"line_number":248,"context_line":"  template:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3f044301_234c109d","line":245,"range":{"start_line":215,"start_character":0,"end_line":245,"end_character":35},"updated":"2017-05-04 16:36:14.000000000","message":"We could probably cleanup even more here:\nIf the shell script/template directly generates the facts, we can just read the local facts to generate the container configs! The less tasks the better.\n\nThat could come in a later commit \u0027though.","commit_id":"4b8c40025a948b3b21acdf226300a954ac06575e"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"03ef992a1889fbabbceda909e23896fb182e69e6","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        for i in {1..6}; do"},{"line_number":213,"context_line":"          echo -n ${hexchars:$(( $RANDOM % 16 )):1}"},{"line_number":214,"context_line":"        done | sed -e \u0027s/\\(..\\)/:\\1/g\u0027"},{"line_number":215,"context_line":"      )\" \u003e /var/lib/lxc/{{ inventory_hostname }}/{{ item.value.interface }}.hwaddr"},{"line_number":216,"context_line":"  args:"},{"line_number":217,"context_line":"    executable: /bin/bash"},{"line_number":218,"context_line":"    creates: \"/var/lib/lxc/{{ inventory_hostname }}/{{ item.value.interface }}.hwaddr\""},{"line_number":219,"context_line":"  with_dict: \"{{ container_networks | default({}) }}\""},{"line_number":220,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":221,"context_line":"  when:"},{"line_number":222,"context_line":"    - lxc_container_fixed_mac | bool"},{"line_number":223,"context_line":"  tags:"},{"line_number":224,"context_line":"    - lxc_container_create-networks"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"- name: Gather hardware addresses to be used as facts"},{"line_number":227,"context_line":"  command: cat /var/lib/lxc/{{ inventory_hostname }}/{{ item.value.interface }}.hwaddr"},{"line_number":228,"context_line":"  changed_when: false"},{"line_number":229,"context_line":"  register: macs"},{"line_number":230,"context_line":"  with_dict: \"{{ container_networks | default({}) }}\""},{"line_number":231,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":232,"context_line":"  when:"},{"line_number":233,"context_line":"    - lxc_container_fixed_mac | bool"},{"line_number":234,"context_line":"  tags:"},{"line_number":235,"context_line":"    - lxc_container_create-networks"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"# NOTE(cloudnull): To dynamically set the the mac address \"facts\" Ansible line format is being used"},{"line_number":238,"context_line":"- name: Set fixed hardware address fact"},{"line_number":239,"context_line":"  set_fact: \"{{item.item.value.interface }}_mac_address\u003d{{ item.stdout }}\""},{"line_number":240,"context_line":"  with_items:"},{"line_number":241,"context_line":"    - \"{{ macs.results }}\""},{"line_number":242,"context_line":"  when:"},{"line_number":243,"context_line":"    - lxc_container_fixed_mac | bool"},{"line_number":244,"context_line":"  tags:"},{"line_number":245,"context_line":"    - lxc_container_create-networks"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"- name: Write container MACs as local facts"},{"line_number":248,"context_line":"  template:"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"3f044301_87940946","line":245,"range":{"start_line":215,"start_character":0,"end_line":245,"end_character":35},"in_reply_to":"3f044301_234c109d","updated":"2017-05-04 19:37:53.000000000","message":"Yeah, true; we could probably consolidate the tasks into fewer and avoid registering the fact in both the hostvars and ansible_local dicts. Mostly I\u0027m leaving that part as is so I\u0027m touching less in one patch.","commit_id":"4b8c40025a948b3b21acdf226300a954ac06575e"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"5489dff96940932939b93a4c177385cc24318384","unresolved":false,"context_lines":[{"line_number":466,"context_line":"  tags:"},{"line_number":467,"context_line":"    - lxc_container_create-hostname"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"- name: Allow the usage of local facts"},{"line_number":470,"context_line":"  file:"},{"line_number":471,"context_line":"    path: /etc/ansible/facts.d/"},{"line_number":472,"context_line":"    state: directory"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"3f044301_f557b301","side":"PARENT","line":469,"updated":"2017-05-08 18:57:13.000000000","message":"This task is creating a facts directory in the container, not on the host. I don\u0027t think this should be removed as it\u0027s there to cater for upgrades.","commit_id":"4f4fca7507a0171b3eb076b2f8e1fc81fe94bf61"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"cb3280e43ec167a90981736eb40fc62867e2a636","unresolved":false,"context_lines":[{"line_number":466,"context_line":"  tags:"},{"line_number":467,"context_line":"    - lxc_container_create-hostname"},{"line_number":468,"context_line":""},{"line_number":469,"context_line":"- name: Allow the usage of local facts"},{"line_number":470,"context_line":"  file:"},{"line_number":471,"context_line":"    path: /etc/ansible/facts.d/"},{"line_number":472,"context_line":"    state: directory"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"3f044301_d8874e0f","side":"PARENT","line":469,"in_reply_to":"3f044301_f557b301","updated":"2017-05-08 20:30:11.000000000","message":"Good call. I\u0027ll put it back.","commit_id":"4f4fca7507a0171b3eb076b2f8e1fc81fe94bf61"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"aaa5cf280396c50b36002f401e900dc92e0b607a","unresolved":false,"context_lines":[{"line_number":16,"context_line":"- name: Read custom facts from previous runs"},{"line_number":17,"context_line":"  setup:"},{"line_number":18,"context_line":"      filter: ansible_local"},{"line_number":19,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"- name: Check for lxc volume group"},{"line_number":22,"context_line":"  shell: \"(which vgs \u003e /dev/null \u0026\u0026 vgs | grep -o \u0027{{ lxc_container_vg_name }}\u0027) || false\""}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3f044301_50e0ae96","line":19,"updated":"2017-05-09 08:48:57.000000000","message":"Perhaps this should get the \u0027always\u0027 tag to ensure it always runs?","commit_id":"26158b0f18fc0aed10b1ab68a11ce8bb9bc2d74b"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"aaa5cf280396c50b36002f401e900dc92e0b607a","unresolved":false,"context_lines":[{"line_number":237,"context_line":"   - lxc_container_fixed_mac | bool"},{"line_number":238,"context_line":"   - inventory_hostname in ansible_local[\u0027mac\u0027]"},{"line_number":239,"context_line":"  tags:"},{"line_number":240,"context_line":"   - lxc-container-networks"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"- name: Gather hardware addresses to be used as facts"},{"line_number":243,"context_line":"  command: cat /var/lib/lxc/{{ inventory_hostname }}/{{ item.value.interface }}.hwaddr"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3f044301_d0d4bebf","line":240,"range":{"start_line":240,"start_character":5,"end_line":240,"end_character":27},"updated":"2017-05-09 08:48:57.000000000","message":"lxc_container_create-networks","commit_id":"26158b0f18fc0aed10b1ab68a11ce8bb9bc2d74b"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"aaa5cf280396c50b36002f401e900dc92e0b607a","unresolved":false,"context_lines":[{"line_number":258,"context_line":"  when:"},{"line_number":259,"context_line":"    - lxc_container_fixed_mac | bool"},{"line_number":260,"context_line":"  tags:"},{"line_number":261,"context_line":"    - lxc-container-networks"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"- name: Create MAC fact file"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3f044301_f0d1face","line":261,"range":{"start_line":261,"start_character":6,"end_line":261,"end_character":28},"updated":"2017-05-09 08:48:57.000000000","message":"lxc_container_create-networks","commit_id":"26158b0f18fc0aed10b1ab68a11ce8bb9bc2d74b"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"aaa5cf280396c50b36002f401e900dc92e0b607a","unresolved":false,"context_lines":[{"line_number":265,"context_line":"  file:"},{"line_number":266,"context_line":"   dest: /etc/ansible/facts.d/mac.fact"},{"line_number":267,"context_line":"   state: touch"},{"line_number":268,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"# NOTE(palendae): If a unique identifier (like the hostname) is not provided as the marker, only one block will be written."},{"line_number":271,"context_line":"# Each host will be written once, and whichever one came last will be the only one in the file."}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3f044301_1099061e","line":268,"updated":"2017-05-09 08:48:57.000000000","message":"This should probably be tagged to ensure the complete code path is executed when using a tag filter.","commit_id":"26158b0f18fc0aed10b1ab68a11ce8bb9bc2d74b"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"aaa5cf280396c50b36002f401e900dc92e0b607a","unresolved":false,"context_lines":[{"line_number":276,"context_line":"    block: \"{{ lookup(\u0027template\u0027, \u0027macs.fact.j2\u0027) }}\""},{"line_number":277,"context_line":"  when:"},{"line_number":278,"context_line":"    - lxc_container_fixed_mac | bool"},{"line_number":279,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"# NOTE(palendae): This is necessary to read any local facts in to the \u0027ansible_local\u0027 dict."},{"line_number":282,"context_line":"- name: Read local facts in for use"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3f044301_d0a27e4b","line":279,"updated":"2017-05-09 08:48:57.000000000","message":"This should probably be tagged to ensure the complete code path is executed when using a tag filter.","commit_id":"26158b0f18fc0aed10b1ab68a11ce8bb9bc2d74b"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"aaa5cf280396c50b36002f401e900dc92e0b607a","unresolved":false,"context_lines":[{"line_number":284,"context_line":"      filter: ansible_local"},{"line_number":285,"context_line":"  when:"},{"line_number":286,"context_line":"      - lxc_container_fixed_mac | bool"},{"line_number":287,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"- name: LXC host config for container networks"},{"line_number":290,"context_line":"  template:"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3f044301_70fe0a38","line":287,"updated":"2017-05-09 08:48:57.000000000","message":"Perhaps this should get the \u0027always\u0027 tag to ensure it always runs?","commit_id":"26158b0f18fc0aed10b1ab68a11ce8bb9bc2d74b"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"15d8a512019d6b4cccc091ce3be5c91c3042fc7b","unresolved":false,"context_lines":[{"line_number":222,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":223,"context_line":"  when:"},{"line_number":224,"context_line":"    - lxc_container_fixed_mac | bool"},{"line_number":225,"context_line":"    - inventory_hostname not in ansible_local[\u0027mac\u0027]"},{"line_number":226,"context_line":"  tags:"},{"line_number":227,"context_line":"    - lxc_container_create-networks"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":11,"id":"3f044301_4708d690","line":225,"range":{"start_line":225,"start_character":32,"end_line":225,"end_character":52},"updated":"2017-05-10 18:28:45.000000000","message":"so ansible_local[\u0027mac\u0027] is always defined?\nI think we may want safety and \n- ansible_local[\u0027mac\u0027] is defined.\n\nAlso shouldn\u0027t we try all the hw address instead of just the inventory_hostname? I guess we can consider the whole operation of the generation of macadresses as atomistic, and therefore we wouldn\u0027t need more tests.","commit_id":"4a0bf1a71706ea49a6fdaa1d5152eee96fde89d7"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"569bba10f3362b1cf76b8e5156c221ec6b12eadc","unresolved":false,"context_lines":[{"line_number":222,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":223,"context_line":"  when:"},{"line_number":224,"context_line":"    - lxc_container_fixed_mac | bool"},{"line_number":225,"context_line":"    - inventory_hostname not in ansible_local[\u0027mac\u0027]"},{"line_number":226,"context_line":"  tags:"},{"line_number":227,"context_line":"    - lxc_container_create-networks"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":11,"id":"3f044301_a515409e","line":225,"range":{"start_line":225,"start_character":32,"end_line":225,"end_character":52},"in_reply_to":"3f044301_4708d690","updated":"2017-05-11 16:02:45.000000000","message":"After a brief chat in IRC, I don\u0027t loop over the mac addresses individually here because parsing them and/or the container network names in Ansible is pretty messy. Thus, I use the presence of the inventory_hostname\u0027s dict.\n\nI\u0027ll add a check for the `mac` dict being present, though I\u0027ll use an `in` check instead of `is defined` since Ansible can throw errors in instances where the keys aren\u0027t present when using the `is defined` conditional.","commit_id":"4a0bf1a71706ea49a6fdaa1d5152eee96fde89d7"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"71127ca4ec5678f9ef47f95b088838155dd9942b","unresolved":false,"context_lines":[{"line_number":222,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":223,"context_line":"  when:"},{"line_number":224,"context_line":"    - lxc_container_fixed_mac | bool"},{"line_number":225,"context_line":"    - (\u0027mac\u0027 not in ansible_local or inventory_hostname not in ansible_local[\u0027mac\u0027])"},{"line_number":226,"context_line":"  tags:"},{"line_number":227,"context_line":"    - lxc_container_create-networks"},{"line_number":228,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":12,"id":"3f044301_9716f748","line":225,"updated":"2017-05-11 16:18:42.000000000","message":"This is slightly different than what was requested in review. It\u0027s to make sure that we generate MAC addresses even if we haven\u0027t read in any local mac facts yet. If we *have* read in some local mac facts, then only generate for the current host if that host doesn\u0027t already have mac facts set.\n\nSetting to `\u0027mac\u0027 in ansible_local and inventory_hostname not in ansible_local[\u0027mac\u0027]` would have meant that MAC addresses were generated only when mac facts already existed, which isn\u0027t the case on the very first run to make the containers, since those facts are written later in the role.","commit_id":"3be26f7dae545fb738e44ac1a1f2c8724e7d115a"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"b28f7027f80563c545ec3cb102235c016726ee3e","unresolved":false,"context_lines":[{"line_number":229,"context_line":"# NOTE(palendae): If we have saved MACs, write those out instead of generating new ones."},{"line_number":230,"context_line":"# Parentheses on the mac in ansible_local check to make the YAML parser happy."},{"line_number":231,"context_line":"- name: Set saved interface mac address"},{"line_number":232,"context_line":"  shell: |"},{"line_number":233,"context_line":"      echo {{ item.value }} \u003e /var/lib/lxc/{{ inventory_hostname }}/{{ item.key }}.hwaddr"},{"line_number":234,"context_line":"  args:"},{"line_number":235,"context_line":"   executable: /bin/bash"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"3f044301_6bd13f23","line":232,"range":{"start_line":232,"start_character":2,"end_line":232,"end_character":7},"updated":"2017-05-12 09:19:34.000000000","message":"Should this be a lineinfile to avoid breaking idempotency?","commit_id":"3a0a2c852b61d3f0cc1f08dc212f07ec58c87e36"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"f648fcb13c25aacf1aeb6dea2f9a0ea34f443ece","unresolved":false,"context_lines":[{"line_number":229,"context_line":"# NOTE(palendae): If we have saved MACs, write those out instead of generating new ones."},{"line_number":230,"context_line":"# Parentheses on the mac in ansible_local check to make the YAML parser happy."},{"line_number":231,"context_line":"- name: Set saved interface mac address"},{"line_number":232,"context_line":"  shell: |"},{"line_number":233,"context_line":"      echo {{ item.value }} \u003e /var/lib/lxc/{{ inventory_hostname }}/{{ item.key }}.hwaddr"},{"line_number":234,"context_line":"  args:"},{"line_number":235,"context_line":"   executable: /bin/bash"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"1f013ff3_44b504ee","line":232,"range":{"start_line":232,"start_character":2,"end_line":232,"end_character":7},"in_reply_to":"1f013ff3_0176ced9","updated":"2017-05-12 16:43:51.000000000","message":"\u0027creates\u0027 will make this task skip if the file exists and will *never* change it. Is that the behaviour you\u0027re looking for?","commit_id":"3a0a2c852b61d3f0cc1f08dc212f07ec58c87e36"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"87f0f94cdc2517d83ca7c56c6873aea5e525a2bd","unresolved":false,"context_lines":[{"line_number":229,"context_line":"# NOTE(palendae): If we have saved MACs, write those out instead of generating new ones."},{"line_number":230,"context_line":"# Parentheses on the mac in ansible_local check to make the YAML parser happy."},{"line_number":231,"context_line":"- name: Set saved interface mac address"},{"line_number":232,"context_line":"  shell: |"},{"line_number":233,"context_line":"      echo {{ item.value }} \u003e /var/lib/lxc/{{ inventory_hostname }}/{{ item.key }}.hwaddr"},{"line_number":234,"context_line":"  args:"},{"line_number":235,"context_line":"   executable: /bin/bash"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"1f013ff3_b54bd0ae","line":232,"range":{"start_line":232,"start_character":2,"end_line":232,"end_character":7},"in_reply_to":"1f013ff3_44b504ee","updated":"2017-05-12 20:23:43.000000000","message":"With \u0027lxc_container_fixed_mac\u0027 enabled, I would say yes, that\u0027s what it should be doing. Perhaps I\u0027m wrong there.","commit_id":"3a0a2c852b61d3f0cc1f08dc212f07ec58c87e36"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"685b992078df02088e41fb1bef456a7386f40fcc","unresolved":false,"context_lines":[{"line_number":229,"context_line":"# NOTE(palendae): If we have saved MACs, write those out instead of generating new ones."},{"line_number":230,"context_line":"# Parentheses on the mac in ansible_local check to make the YAML parser happy."},{"line_number":231,"context_line":"- name: Set saved interface mac address"},{"line_number":232,"context_line":"  shell: |"},{"line_number":233,"context_line":"      echo {{ item.value }} \u003e /var/lib/lxc/{{ inventory_hostname }}/{{ item.key }}.hwaddr"},{"line_number":234,"context_line":"  args:"},{"line_number":235,"context_line":"   executable: /bin/bash"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"1f013ff3_9d777f03","line":232,"range":{"start_line":232,"start_character":2,"end_line":232,"end_character":7},"in_reply_to":"1f013ff3_b54bd0ae","updated":"2017-05-17 09:08:28.000000000","message":"Could you please rename this task and the previous one to express they are following two different path:\nFirst task: Create a unique interface mac address because none are stored in facts\nSecond task: Reuse existing mac address stored in host facts.\n\nImproves readability IMO.","commit_id":"3a0a2c852b61d3f0cc1f08dc212f07ec58c87e36"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"7a86797b0116724cdea06ea0358977aa9484f0b0","unresolved":false,"context_lines":[{"line_number":229,"context_line":"# NOTE(palendae): If we have saved MACs, write those out instead of generating new ones."},{"line_number":230,"context_line":"# Parentheses on the mac in ansible_local check to make the YAML parser happy."},{"line_number":231,"context_line":"- name: Set saved interface mac address"},{"line_number":232,"context_line":"  shell: |"},{"line_number":233,"context_line":"      echo {{ item.value }} \u003e /var/lib/lxc/{{ inventory_hostname }}/{{ item.key }}.hwaddr"},{"line_number":234,"context_line":"  args:"},{"line_number":235,"context_line":"   executable: /bin/bash"}],"source_content_type":"text/x-yaml","patch_set":13,"id":"1f013ff3_0176ced9","line":232,"range":{"start_line":232,"start_character":2,"end_line":232,"end_character":7},"in_reply_to":"3f044301_6bd13f23","updated":"2017-05-12 16:21:09.000000000","message":"The `creates` section of this task should handle the idempotency, shouldn\u0027t it?","commit_id":"3a0a2c852b61d3f0cc1f08dc212f07ec58c87e36"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"685b992078df02088e41fb1bef456a7386f40fcc","unresolved":false,"context_lines":[{"line_number":264,"context_line":"  tags:"},{"line_number":265,"context_line":"    - lxc_container_create-networks"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"- name: Create MAC fact file"},{"line_number":268,"context_line":"  file:"},{"line_number":269,"context_line":"   dest: /etc/ansible/facts.d/mac.fact"},{"line_number":270,"context_line":"   state: touch"},{"line_number":271,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":272,"context_line":"  tags:"},{"line_number":273,"context_line":"    - lxc_container_create-networks"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"# NOTE(palendae): If a unique identifier (like the hostname) is not provided as the marker, only one block will be written."},{"line_number":276,"context_line":"# Each host will be written once, and whichever one came last will be the only one in the file."}],"source_content_type":"text/x-yaml","patch_set":13,"id":"1f013ff3_bde23b00","line":273,"range":{"start_line":267,"start_character":0,"end_line":273,"end_character":35},"updated":"2017-05-17 09:08:28.000000000","message":"Please remove this, it will always mark the task as changed.\n\nInstead, blockinfile or lineinfile can be used with create: yes.","commit_id":"3a0a2c852b61d3f0cc1f08dc212f07ec58c87e36"},{"author":{"_account_id":17068,"name":"Jean-Philippe Evrard","email":"openstack@a.spamming.party","username":"evrardjp"},"change_message_id":"685b992078df02088e41fb1bef456a7386f40fcc","unresolved":false,"context_lines":[{"line_number":274,"context_line":""},{"line_number":275,"context_line":"# NOTE(palendae): If a unique identifier (like the hostname) is not provided as the marker, only one block will be written."},{"line_number":276,"context_line":"# Each host will be written once, and whichever one came last will be the only one in the file."},{"line_number":277,"context_line":"- name: Write container MACs as local facts"},{"line_number":278,"context_line":"  blockinfile:"},{"line_number":279,"context_line":"    dest: /etc/ansible/facts.d/mac.fact"},{"line_number":280,"context_line":"    marker: \"# {mark} Managed by OpenStack-Ansible {{ inventory_hostname }}\""}],"source_content_type":"text/x-yaml","patch_set":13,"id":"1f013ff3_bdd6bbc2","line":277,"range":{"start_line":277,"start_character":8,"end_line":277,"end_character":43},"updated":"2017-05-17 09:08:28.000000000","message":"\"Ensure mac address fact cache is up to date\"","commit_id":"3a0a2c852b61d3f0cc1f08dc212f07ec58c87e36"}],"tasks/main.yml":[{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"aaa5cf280396c50b36002f401e900dc92e0b607a","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    state: directory"},{"line_number":20,"context_line":"  tags:"},{"line_number":21,"context_line":"    - lxc_container_create-install"},{"line_number":22,"context_line":"  delegate_to: \"{{ physical_host }}\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"- name: Ansible version and LXC backing store check"},{"line_number":25,"context_line":"  fail:"}],"source_content_type":"text/x-yaml","patch_set":10,"id":"3f044301_9084f6b2","line":22,"updated":"2017-05-09 08:48:57.000000000","message":"Perhaps this should have the always tag?","commit_id":"26158b0f18fc0aed10b1ab68a11ce8bb9bc2d74b"}]}
