)]}'
{"scripts/openstack-ansible.rc":[{"author":{"_account_id":22042,"name":"Chris Smart","email":"distroguy@gmail.com","username":"csmart"},"change_message_id":"dba6a5b7ad35ade93b76a54da092d0fa944342bc","unresolved":false,"context_lines":[{"line_number":17,"context_line":"export ANSIBLE_INVENTORY\u003d\"${ANSIBLE_INVENTORY:-inventory}\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"export ANSIBLE_LOG_PATH\u003d\"${ANSIBLE_LOG_PATH:-/openstack/log/ansible-logging/ansible.log}\""},{"line_number":20,"context_line":"if [[ ! -d \"$(dirname ${ANSIBLE_LOG_PATH})\" ]]; then"},{"line_number":21,"context_line":"  mkdir -p \"$(dirname ${ANSIBLE_LOG_PATH})\" || unset ANSIBLE_LOG_PATH"},{"line_number":22,"context_line":"fi"},{"line_number":23,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"9a89bdaa_34dc4674","line":20,"updated":"2016-09-08 22:49:50.000000000","message":"Nit: I think you could skip the if check and just do the mkdir -p command.\n\nAlso, I\u0027m kind of surprised that this dir doesn\u0027t already exist (not already made elsewhere).\n\nIs this for checking if we can create _custom_ log locations, or also whether we can create the default log location? In the current form, if LOG dir is the default and it can\u0027t be created, then it\u0027s unset. Whereas, maybe what\u0027s meant is, if you can\u0027t create a custom location then use the default? I\u0027m not sure which is meant.\n\nWhat happens if there\u0027s no ANSIBLE_LOG_PATH? Do logs just go to stdout?","commit_id":"b4905090f410d154665f6708bd8136735acb4160"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"739d7c7079769edb6ffa0579acf40f713d76693f","unresolved":false,"context_lines":[{"line_number":17,"context_line":"export ANSIBLE_INVENTORY\u003d\"${ANSIBLE_INVENTORY:-inventory}\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"export ANSIBLE_LOG_PATH\u003d\"${ANSIBLE_LOG_PATH:-/openstack/log/ansible-logging/ansible.log}\""},{"line_number":20,"context_line":"if [[ ! -d \"$(dirname ${ANSIBLE_LOG_PATH})\" ]]; then"},{"line_number":21,"context_line":"  mkdir -p \"$(dirname ${ANSIBLE_LOG_PATH})\" || unset ANSIBLE_LOG_PATH"},{"line_number":22,"context_line":"fi"},{"line_number":23,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"9a89bdaa_d24f6068","line":20,"in_reply_to":"9a89bdaa_34dc4674","updated":"2016-09-11 02:06:53.000000000","message":"THe option is ignored if no log path is present (default found here: https://github.com/ansible/ansible/blob/devel/lib/ansible/constants.py#L187). So this change is effectively reverting to the default if the log path does not exist or can not be created.","commit_id":"b4905090f410d154665f6708bd8136735acb4160"},{"author":{"_account_id":22042,"name":"Chris Smart","email":"distroguy@gmail.com","username":"csmart"},"change_message_id":"f70365d460eec976c34aa9b1781e291fdec2fc24","unresolved":false,"context_lines":[{"line_number":17,"context_line":"export ANSIBLE_INVENTORY\u003d\"${ANSIBLE_INVENTORY:-inventory}\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"export ANSIBLE_LOG_PATH\u003d\"${ANSIBLE_LOG_PATH:-/openstack/log/ansible-logging/ansible.log}\""},{"line_number":20,"context_line":"if [[ ! -d \"$(dirname ${ANSIBLE_LOG_PATH})\" ]]; then"},{"line_number":21,"context_line":"  mkdir -p \"$(dirname ${ANSIBLE_LOG_PATH})\" || unset ANSIBLE_LOG_PATH"},{"line_number":22,"context_line":"fi"},{"line_number":23,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"9a89bdaa_f3e7fc0f","line":20,"in_reply_to":"9a89bdaa_d24f6068","updated":"2016-09-12 03:58:07.000000000","message":"@Kevin ok, thanks!\n\nSo if ANSIBLE_LOG_PATH is not set then it will use the default.\n\nI guess that means that if ANSIBLE_LOG_PATH is _already_ set to the default and for some reason it cannot create the dir, it will get unset here, but then re-set back to the same at some point, but we can expect the build process to potentially fail (or not have logs) at some point because the default log dir won\u0027t exist? I\u0027m not sure what happens if there is no valid log dir available.\n\nAlso, I think you could still just use mkdir and skip the if statement entirely, as the -p flag will make mkdir do the right thing, i.e. if the dir already exists the return will be 0 :-)","commit_id":"b4905090f410d154665f6708bd8136735acb4160"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"acc01ecf58fea4dcac3c36e2a6a1e518c0ef6cd1","unresolved":false,"context_lines":[{"line_number":17,"context_line":"export ANSIBLE_INVENTORY\u003d\"${ANSIBLE_INVENTORY:-inventory}\""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"export ANSIBLE_LOG_PATH\u003d\"${ANSIBLE_LOG_PATH:-/openstack/log/ansible-logging/ansible.log}\""},{"line_number":20,"context_line":"if [[ ! -d \"$(dirname ${ANSIBLE_LOG_PATH})\" ]]; then"},{"line_number":21,"context_line":"  mkdir -p \"$(dirname ${ANSIBLE_LOG_PATH})\" || unset ANSIBLE_LOG_PATH"},{"line_number":22,"context_line":"fi"},{"line_number":23,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"7a8ec9b2_7937a0e3","line":20,"in_reply_to":"9a89bdaa_f3e7fc0f","updated":"2016-09-13 21:41:45.000000000","message":"Done","commit_id":"b4905090f410d154665f6708bd8136735acb4160"}]}
