)]}'
{"playbooks/os-cinder-install.yml":[{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"14f5eede46f7113e97922b74931e1687f0390f0b","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  pre_tasks:"},{"line_number":21,"context_line":"    - name: Add volume group block device to cinder"},{"line_number":22,"context_line":"      shell: |"},{"line_number":23,"context_line":"        {% if item.1.volume_group is defined %}"},{"line_number":24,"context_line":"        if [ \"$(pvdisplay | grep -B1 {{ item.1.volume_group }} | awk \u0027/PV/ {print $3}\u0027)\" ];then"},{"line_number":25,"context_line":"          for device in `pvdisplay | grep -B1 {{ item.1.volume_group }} | awk \u0027/PV/ {print $3}\u0027`"},{"line_number":26,"context_line":"            do lxc-device -n {{ container_name }} add $device"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"baa041b7_fac4f040","line":23,"updated":"2015-04-02 20:47:25.000000000","message":"Might this conditional be better in the when stanza?","commit_id":"d493f8a3fcf41da9b8e834a8c75f8f7ec634b936"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"a0f6ae7c0e07a2fff0a8c80401fb4252a70b32e2","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  pre_tasks:"},{"line_number":21,"context_line":"    - name: Add volume group block device to cinder"},{"line_number":22,"context_line":"      shell: |"},{"line_number":23,"context_line":"        {% if item.1.volume_group is defined %}"},{"line_number":24,"context_line":"        if [ \"$(pvdisplay | grep -B1 {{ item.1.volume_group }} | awk \u0027/PV/ {print $3}\u0027)\" ];then"},{"line_number":25,"context_line":"          for device in `pvdisplay | grep -B1 {{ item.1.volume_group }} | awk \u0027/PV/ {print $3}\u0027`"},{"line_number":26,"context_line":"            do lxc-device -n {{ container_name }} add $device"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"baa041b7_78f229d4","line":23,"in_reply_to":"baa041b7_1a8794b6","updated":"2015-04-02 21:08:52.000000000","message":"Ok, that makes sense.","commit_id":"d493f8a3fcf41da9b8e834a8c75f8f7ec634b936"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"365022e5e692619f5195615cdc46cfe65314fcda","unresolved":false,"context_lines":[{"line_number":20,"context_line":"  pre_tasks:"},{"line_number":21,"context_line":"    - name: Add volume group block device to cinder"},{"line_number":22,"context_line":"      shell: |"},{"line_number":23,"context_line":"        {% if item.1.volume_group is defined %}"},{"line_number":24,"context_line":"        if [ \"$(pvdisplay | grep -B1 {{ item.1.volume_group }} | awk \u0027/PV/ {print $3}\u0027)\" ];then"},{"line_number":25,"context_line":"          for device in `pvdisplay | grep -B1 {{ item.1.volume_group }} | awk \u0027/PV/ {print $3}\u0027`"},{"line_number":26,"context_line":"            do lxc-device -n {{ container_name }} add $device"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"baa041b7_1a8794b6","line":23,"in_reply_to":"baa041b7_fac4f040","updated":"2015-04-02 20:55:42.000000000","message":"The conditional will not work in the *when* stanza as the items would not be available in the iterator at that time. Looking at the function, it seems that introducing the Jinja2 rendered conditional is likely the only way to accomplish this task when a multi-cinder backend does not have a particular volume_group, as is the case when using NETAPP.","commit_id":"d493f8a3fcf41da9b8e834a8c75f8f7ec634b936"}]}
