)]}'
{"doc/source/developer/developing_elements.rst":[{"author":{"_account_id":7294,"name":"Leif Madsen","email":"lmadsen@redhat.com","username":"leifmadsen"},"change_message_id":"a41405cd07997a648eae9d8b8a894a7fda488380","unresolved":false,"context_lines":[{"line_number":145,"context_line":"  operations here to only those necessary to affect the filesystem metadata and"},{"line_number":146,"context_line":"  image itself. For most operations, ``post-install.d`` is preferred."},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"  * runs: **in chroot** "},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"``post-finalise.d``"},{"line_number":151,"context_line":"  Perform final tuning of the root filesystem. Runs in a chroot after the root"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da6895a0_5e6385b1","line":148,"range":{"start_line":148,"start_character":23,"end_line":148,"end_character":24},"updated":"2016-10-21 14:32:13.000000000","message":"I know not your error, but can you clean up this whitespace?","commit_id":"531149b55ae7c77485aade5a389bdfb1b497b976"},{"author":{"_account_id":7294,"name":"Leif Madsen","email":"lmadsen@redhat.com","username":"leifmadsen"},"change_message_id":"a41405cd07997a648eae9d8b8a894a7fda488380","unresolved":false,"context_lines":[{"line_number":156,"context_line":"  Because this happens inside the final image, it is important to limit"},{"line_number":157,"context_line":"  operations here to only those necessary to affect the filesystem metadata and"},{"line_number":158,"context_line":"  image itself. For most operations, ``post-install.d`` is preferred."},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"  * runs: **outside chroot**"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"``cleanup.d``"}],"source_content_type":"text/x-rst","patch_set":5,"id":"da6895a0_9ee27d02","line":159,"updated":"2016-10-21 14:32:13.000000000","message":"I think it would be worth it to add an example situation here to make it more clear why post-install.d is preferred over post-finalise.d.\n\ne.g. you want to run a post-install Ansible playbook.","commit_id":"531149b55ae7c77485aade5a389bdfb1b497b976"}],"elements/simple-playbook/README.rst":[{"author":{"_account_id":23163,"name":"Markos Chandras (hwoarang)","email":"markos@chandras.me","username":"mchandras"},"change_message_id":"f26f04732724456283a849b3c34b85a5aa1ad593","unresolved":false,"context_lines":[{"line_number":2,"context_line":"simple-playbook"},{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"Run ansible-playbook, from post-finalise phase, againsted the"},{"line_number":6,"context_line":"diskimage-builder chroot. The following environment variables can be"},{"line_number":7,"context_line":"useful for configuration:"},{"line_number":8,"context_line":""}],"source_content_type":"text/x-rst","patch_set":17,"id":"da6895a0_1b2f3bf7","line":5,"updated":"2016-10-24 07:51:10.000000000","message":"should this be s/post-finalise/cleanup/ so people can relate this with the real \u0027cleanup.d\u0027 directory as listed in http://docs.openstack.org/developer/diskimage-builder/developer/developing_elements.html?\n\nyou could possibly make the same change to the commit message as well.","commit_id":"6a75ac41e8325b29b45d99cb1755edbef6e9846e"},{"author":{"_account_id":7294,"name":"Leif Madsen","email":"lmadsen@redhat.com","username":"leifmadsen"},"change_message_id":"c6c583955b5e0b375e7f7009fca06ec415ec5d7d","unresolved":false,"context_lines":[{"line_number":2,"context_line":"simple-playbook"},{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"Run ansible-playbook, from the clean phase, againsted the chroot"},{"line_number":6,"context_line":"created by diskimage-builder. The following environment variables"},{"line_number":7,"context_line":"can be useful for configuration:"},{"line_number":8,"context_line":""}],"source_content_type":"text/x-rst","patch_set":18,"id":"da6895a0_b492d99d","line":5,"range":{"start_line":5,"start_character":44,"end_line":5,"end_character":53},"updated":"2016-10-24 12:18:43.000000000","message":"against","commit_id":"fd3e3685bf5577be74fde437806de3bd5caa5a10"}],"elements/simple-playbook/cleanup.d/80-ansible-playbook":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"0fe0779380810e1df8e621ccf90a42923cef1e09","unresolved":false,"context_lines":[{"line_number":22,"context_line":"set -o pipefail"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"# NOTE(pabelanger): We need sudo so ansible can mount chroot."},{"line_number":25,"context_line":"sudo ${ANSIBLE_PLAYBOOK_CMD} -i ${TMP_BUILD_DIR}/simple-playbook/inventory ${ANSIBLE_PLAYBOOK} ${ANSIBLE_ARGS}"}],"source_content_type":"application/x-shellscript","patch_set":19,"id":"da6895a0_c2377dae","line":25,"updated":"2016-10-25 04:47:20.000000000","message":"nit, but you can just add the safe_sudo call to the end of the line; that was the idea moving forward to show we\u0027d audited each call","commit_id":"69f250eed2f8716c49b6588f01b36e6bc259dc06"}],"elements/simple-playbook/extra-data.d/50-ansible-inventory":[{"author":{"_account_id":7294,"name":"Leif Madsen","email":"lmadsen@redhat.com","username":"leifmadsen"},"change_message_id":"a41405cd07997a648eae9d8b8a894a7fda488380","unresolved":false,"context_lines":[{"line_number":24,"context_line":"fi"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# NOTE(pabelanger): We could have the playbook use add_hosts, but there is"},{"line_number":27,"context_line":"# an uptream bug. https://github.com/ansible/ansible/issues/12728"},{"line_number":28,"context_line":"ANSIBLE_INVENTORY\u003d\"\\"},{"line_number":29,"context_line":"[dib_chroot]"},{"line_number":30,"context_line":"$TMP_BUILD_DIR/mnt ansible_connection\u003dchroot\""}],"source_content_type":"application/x-shellscript","patch_set":5,"id":"da6895a0_9e46fd21","line":27,"range":{"start_line":27,"start_character":5,"end_line":27,"end_character":12},"updated":"2016-10-21 14:32:13.000000000","message":"upstream","commit_id":"531149b55ae7c77485aade5a389bdfb1b497b976"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"0fe0779380810e1df8e621ccf90a42923cef1e09","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    die \"Can not find playbook for simple-playbook\""},{"line_number":24,"context_line":"fi"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"if [ ! -x $ANSIBLE_PLAYBOOK_CMD ]; then"},{"line_number":27,"context_line":"    die \"Can not find ansible-playbook binary\""},{"line_number":28,"context_line":"fi"},{"line_number":29,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":19,"id":"da6895a0_42736d80","line":26,"updated":"2016-10-25 04:47:20.000000000","message":"we\u0027ve done this with\n\n [ -z $(which ...) ]\n\nor similar in other places, to make it path independent.  i think that\u0027s probably good, since you\u0027d be surely getting this from the virtualenv where the path might be odd","commit_id":"69f250eed2f8716c49b6588f01b36e6bc259dc06"},{"author":{"_account_id":4162,"name":"Paul Belanger","email":"pabelanger@redhat.com","username":"pabelanger"},"change_message_id":"984723cab92adb252569329a17eec1b5522a3323","unresolved":false,"context_lines":[{"line_number":23,"context_line":"    die \"Can not find playbook for simple-playbook\""},{"line_number":24,"context_line":"fi"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"if [ ! -x $ANSIBLE_PLAYBOOK_CMD ]; then"},{"line_number":27,"context_line":"    die \"Can not find ansible-playbook binary\""},{"line_number":28,"context_line":"fi"},{"line_number":29,"context_line":""}],"source_content_type":"application/x-shellscript","patch_set":19,"id":"da6895a0_f1f43e88","line":26,"in_reply_to":"da6895a0_42736d80","updated":"2016-10-25 21:16:41.000000000","message":"The issue is, we likey need to use the full path here because we use sudo, and / or virtualenvs that bin path is not passed thru.  Where, full path does.","commit_id":"69f250eed2f8716c49b6588f01b36e6bc259dc06"}],"elements/simple-playbook/test-elements/build-succeeds/environment.d/01-ansible":[{"author":{"_account_id":23163,"name":"Markos Chandras (hwoarang)","email":"markos@chandras.me","username":"mchandras"},"change_message_id":"afc3ee774c17cdd9b7ba59fa5216811734be7931","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"# under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then"},{"line_number":17,"context_line":"    set -x"},{"line_number":18,"context_line":"fi"},{"line_number":19,"context_line":"set -eu"}],"source_content_type":"application/x-shellscript","patch_set":10,"id":"da6895a0_d1684dbd","line":16,"updated":"2016-10-23 15:00:37.000000000","message":"So according to this https://review.openstack.org/#/c/388972/\n\nenv files should not enable tracing so perhaps we can drop this now in order to not accidentally introduce this behavior again.","commit_id":"82e74db735ccbfa7c89c514384d63b2affc99fc7"},{"author":{"_account_id":4162,"name":"Paul Belanger","email":"pabelanger@redhat.com","username":"pabelanger"},"change_message_id":"9ea0264f8550c06ba55fcb6b129ee7554c90daba","unresolved":false,"context_lines":[{"line_number":13,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"# under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then"},{"line_number":17,"context_line":"    set -x"},{"line_number":18,"context_line":"fi"},{"line_number":19,"context_line":"set -eu"}],"source_content_type":"application/x-shellscript","patch_set":10,"id":"da6895a0_4410f8a8","line":16,"in_reply_to":"da6895a0_d1684dbd","updated":"2016-10-23 22:55:32.000000000","message":"ack","commit_id":"82e74db735ccbfa7c89c514384d63b2affc99fc7"},{"author":{"_account_id":23163,"name":"Markos Chandras (hwoarang)","email":"markos@chandras.me","username":"mchandras"},"change_message_id":"afc3ee774c17cdd9b7ba59fa5216811734be7931","unresolved":false,"context_lines":[{"line_number":19,"context_line":"set -eu"},{"line_number":20,"context_line":"set -o pipefail"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"export ANSIBLE_PLAYBOOK_CMD\u003d~/.local/bin/ansible-playbook"}],"source_content_type":"application/x-shellscript","patch_set":10,"id":"da6895a0_3160a9ce","line":22,"updated":"2016-10-23 15:00:37.000000000","message":"I am curious about the default ANSIBLE_PLAYBOOK_CMD value here. Perhaps it whoul be $(which ansible-playbook) or something similar?","commit_id":"82e74db735ccbfa7c89c514384d63b2affc99fc7"},{"author":{"_account_id":4162,"name":"Paul Belanger","email":"pabelanger@redhat.com","username":"pabelanger"},"change_message_id":"9ea0264f8550c06ba55fcb6b129ee7554c90daba","unresolved":false,"context_lines":[{"line_number":19,"context_line":"set -eu"},{"line_number":20,"context_line":"set -o pipefail"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"export ANSIBLE_PLAYBOOK_CMD\u003d~/.local/bin/ansible-playbook"}],"source_content_type":"application/x-shellscript","patch_set":10,"id":"da6895a0_6427bc12","line":22,"in_reply_to":"da6895a0_3160a9ce","updated":"2016-10-23 22:55:32.000000000","message":"I opted for this route for testing, in case ~/.local/bin wasn\u0027t in path.","commit_id":"82e74db735ccbfa7c89c514384d63b2affc99fc7"},{"author":{"_account_id":4162,"name":"Paul Belanger","email":"pabelanger@redhat.com","username":"pabelanger"},"change_message_id":"c61e315524dc0061a2ab09501b10251f865caa2c","unresolved":false,"context_lines":[{"line_number":19,"context_line":"set -eu"},{"line_number":20,"context_line":"set -o pipefail"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"export ANSIBLE_PLAYBOOK_CMD\u003d/home/jenkins/env/bin/ansible-playbook"},{"line_number":23,"context_line":"export ANSIBLE_PLAYBOOK\u003d${DIB_ELEMENTS}/simple-playbook/test-elements/build-succeeds/playbooks/site.yaml"}],"source_content_type":"application/x-shellscript","patch_set":16,"id":"da6895a0_7096964d","line":22,"updated":"2016-10-24 06:32:15.000000000","message":"maybe I should be using the WORKINGDIR var here.","commit_id":"53f238e7e400a17b69ce2d31a7b71e4fd6825b47"},{"author":{"_account_id":23163,"name":"Markos Chandras (hwoarang)","email":"markos@chandras.me","username":"mchandras"},"change_message_id":"baa592e19af63ed7e5caba3bba001d18b7deb3c8","unresolved":false,"context_lines":[{"line_number":19,"context_line":"set -eu"},{"line_number":20,"context_line":"set -o pipefail"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"export ANSIBLE_PLAYBOOK_CMD\u003d/home/jenkins/env/bin/ansible-playbook"},{"line_number":23,"context_line":"export ANSIBLE_PLAYBOOK\u003d${DIB_ELEMENTS}/simple-playbook/test-elements/build-succeeds/playbooks/site.yaml"}],"source_content_type":"application/x-shellscript","patch_set":16,"id":"da6895a0_5b861314","line":22,"in_reply_to":"da6895a0_7096964d","updated":"2016-10-24 07:45:04.000000000","message":"Yes makes sense unless this element is no meant for general consumption.","commit_id":"53f238e7e400a17b69ce2d31a7b71e4fd6825b47"}],"elements/simple-playbook/test-elements/build-succeeds/extra-data.d/01-ansible":[{"author":{"_account_id":23163,"name":"Markos Chandras (hwoarang)","email":"markos@chandras.me","username":"mchandras"},"change_message_id":"afc3ee774c17cdd9b7ba59fa5216811734be7931","unresolved":false,"context_lines":[{"line_number":19,"context_line":"set -eu"},{"line_number":20,"context_line":"set -o pipefail"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"pip install ansible"}],"source_content_type":"application/x-shellscript","patch_set":10,"id":"da6895a0_519b5dc9","line":22,"updated":"2016-10-23 15:00:37.000000000","message":"Perhaps you can only do that if ansible is not already installed on the host?","commit_id":"82e74db735ccbfa7c89c514384d63b2affc99fc7"},{"author":{"_account_id":4162,"name":"Paul Belanger","email":"pabelanger@redhat.com","username":"pabelanger"},"change_message_id":"9ea0264f8550c06ba55fcb6b129ee7554c90daba","unresolved":false,"context_lines":[{"line_number":19,"context_line":"set -eu"},{"line_number":20,"context_line":"set -o pipefail"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"pip install ansible"}],"source_content_type":"application/x-shellscript","patch_set":10,"id":"da6895a0_84221000","line":22,"in_reply_to":"da6895a0_519b5dc9","updated":"2016-10-23 22:55:32.000000000","message":"In the case of the gate, ansible won\u0027t be installed. But if installed by pip it should noop.  Packaging is a different story.\n\nI could go either way, either we assume it is installed but something else (JJB) or we just pip install it for the test.","commit_id":"82e74db735ccbfa7c89c514384d63b2affc99fc7"}],"lib/common-functions":[{"author":{"_account_id":4162,"name":"Paul Belanger","email":"pabelanger@redhat.com","username":"pabelanger"},"change_message_id":"4bf9dd8195d199fa0f2fc04d719812383b6f72c5","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"function ansible_run_d() {"},{"line_number":157,"context_line":"    check_break before-$1 ${break_cmd:-bash}"},{"line_number":158,"context_line":"    if [ -d ${TMP_HOOKS_PATH}/$1.d ] ; then"},{"line_number":159,"context_line":"        ANSIBLE_PLAYBOOK_CMD\u003d${ANSIBLE_PLAYBOOK_CMD:-ansible-playbook}"},{"line_number":160,"context_line":"        ANSIBLE_ARGS\u003d${ANSIBLE_ARGS:--v}"},{"line_number":161,"context_line":"        ansible_generate_inventory"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"fa6399be_e2b4c8d5","line":158,"updated":"2016-10-17 22:41:12.000000000","message":"maybe this should be\n\nif [ -d ${TMP_HOOKS_PATH}/ansible.d/$1.d ] ; then\n\nwhere $1 is phase","commit_id":"d4c7bd77fdae4314a6bf3005abc3f35fd9256a9e"},{"author":{"_account_id":12459,"name":"Stephanie Miller","email":"stephane@alum.mit.edu","username":"cinerama"},"change_message_id":"bdaa66e7c0dc4e35cc90fbd7e4d7171e4409d112","unresolved":false,"context_lines":[{"line_number":155,"context_line":""},{"line_number":156,"context_line":"function ansible_run_d() {"},{"line_number":157,"context_line":"    check_break before-$1 ${break_cmd:-bash}"},{"line_number":158,"context_line":"    if [ -d ${TMP_HOOKS_PATH}/$1.d ] ; then"},{"line_number":159,"context_line":"        ANSIBLE_PLAYBOOK_CMD\u003d${ANSIBLE_PLAYBOOK_CMD:-ansible-playbook}"},{"line_number":160,"context_line":"        ANSIBLE_ARGS\u003d${ANSIBLE_ARGS:--v}"},{"line_number":161,"context_line":"        ansible_generate_inventory"}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"fa6399be_5a2a98e8","line":158,"in_reply_to":"fa6399be_e2b4c8d5","updated":"2016-10-18 18:21:33.000000000","message":"Sounds good, given that the commit message seems to imply this.","commit_id":"d4c7bd77fdae4314a6bf3005abc3f35fd9256a9e"},{"author":{"_account_id":7294,"name":"Leif Madsen","email":"lmadsen@redhat.com","username":"leifmadsen"},"change_message_id":"d8a2598ad3bbda61d9d6ad90297f2acdb1f595f9","unresolved":false,"context_lines":[{"line_number":168,"context_line":"function ansible_generate_inventory() {"},{"line_number":169,"context_line":"    mkdir -p $TMP_BUILD_DIR/ansible"},{"line_number":170,"context_line":"    # NOTE(pabelanger): We could have the playbook use add_hosts, but there is"},{"line_number":171,"context_line":"    # an uptream bug. https://github.com/ansible/ansible/issues/12728"},{"line_number":172,"context_line":"    ANSIBLE_INVENTORY\u003d\"\\"},{"line_number":173,"context_line":"    [dib_chroot]"},{"line_number":174,"context_line":"    $TMP_BUILD_DIR/mnt ansible_connection\u003dchroot\""}],"source_content_type":"application/x-shellscript","patch_set":3,"id":"fa6399be_a2c73063","line":171,"range":{"start_line":171,"start_character":9,"end_line":171,"end_character":16},"updated":"2016-10-17 22:32:44.000000000","message":"upstream","commit_id":"d4c7bd77fdae4314a6bf3005abc3f35fd9256a9e"}]}
