{"action":"created","issue":{"url":"https://api.github.com/repos/neillturner/kitchen-ansible/issues/113","labels_url":"https://api.github.com/repos/neillturner/kitchen-ansible/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/neillturner/kitchen-ansible/issues/113/comments","events_url":"https://api.github.com/repos/neillturner/kitchen-ansible/issues/113/events","html_url":"https://github.com/neillturner/kitchen-ansible/issues/113","id":122109059,"number":113,"title":"Breakage with custom log path in ansible.cfg","user":{"login":"wr0ngway","id":3606,"avatar_url":"https://avatars.githubusercontent.com/u/3606?v=3","gravatar_id":"","url":"https://api.github.com/users/wr0ngway","html_url":"https://github.com/wr0ngway","followers_url":"https://api.github.com/users/wr0ngway/followers","following_url":"https://api.github.com/users/wr0ngway/following{/other_user}","gists_url":"https://api.github.com/users/wr0ngway/gists{/gist_id}","starred_url":"https://api.github.com/users/wr0ngway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wr0ngway/subscriptions","organizations_url":"https://api.github.com/users/wr0ngway/orgs","repos_url":"https://api.github.com/users/wr0ngway/repos","events_url":"https://api.github.com/users/wr0ngway/events{/privacy}","received_events_url":"https://api.github.com/users/wr0ngway/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-14T19:08:36Z","updated_at":"2015-12-15T09:27:46Z","closed_at":null,"body":"If I have an ansible.cfg which sets the log path like so:\r\n```\r\nlog_path            = ./logs/ansible.log\r\n```\r\nThen `kitchen converge` fails with the following error:\r\n\r\n```\r\n       Transferring files to <default-ubuntu-1404>\r\n       Going to invoke ansible-playbook with: ANSIBLE_ROLES_PATH=/tmp/kitchen/roles sudo -E ansible-playbook --inventory-file=/tmp/kitchen/hosts -c local -M /tmp/kitchen/modules -vvv   --vault-password-file=/tmp/kitchen/vaultpw    /tmp/kitchen/default.yml\r\n       Traceback (most recent call last):\r\n         File \"/usr/bin/ansible-playbook\", line 44, in <module>\r\n           import ansible.playbook\r\n         File \"/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py\", line 18, in <module>\r\n           import ansible.inventory\r\n         File \"/usr/lib/pymodules/python2.7/ansible/inventory/__init__.py\", line 26, in <module>\r\n           from ansible.inventory.ini import InventoryParser\r\n         File \"/usr/lib/pymodules/python2.7/ansible/inventory/ini.py\", line 21, in <module>\r\n           from ansible.inventory.host import Host\r\n         File \"/usr/lib/pymodules/python2.7/ansible/inventory/host.py\", line 19, in <module>\r\n           from ansible import utils\r\n         File \"/usr/lib/pymodules/python2.7/ansible/utils/__init__.py\", line 29, in <module>\r\n           from ansible.utils.display_functions import *\r\n         File \"/usr/lib/pymodules/python2.7/ansible/utils/display_functions.py\", line 22, in <module>\r\n           from ansible.callbacks import display\r\n         File \"/usr/lib/pymodules/python2.7/ansible/callbacks.py\", line 42, in <module>\r\n           logging.basicConfig(filename=path, level=logging.DEBUG, format='%(asctime)s %(name)s %(message)s')\r\n         File \"/usr/lib/python2.7/logging/__init__.py\", line 1532, in basicConfig\r\n           hdlr = FileHandler(filename, mode)\r\n       \r\n       StreamHandler.__init__(self, self._open())\r\n         File \"/usr/lib/python2.7/logging/__init__.py\", line 928, in _open\r\n       stream = open(self.baseFilename, self.mode)\r\n       : [Errno 2] No such file or directory: '/home/kitchen/logs/ansible.log'\r\n```\r\n\r\nNot sure why it is looking for the log file in `/home/kitchen/logs/ansible.log` instead of `/tmp/kitchen/logs/ansible.log` (the logs directory is part of our ansible repo)\r\n\r\nIf I remove the `log_path` line from ansible.cfg, things work as expected.\r\n"},"comment":{"url":"https://api.github.com/repos/neillturner/kitchen-ansible/issues/comments/164698305","html_url":"https://github.com/neillturner/kitchen-ansible/issues/113#issuecomment-164698305","issue_url":"https://api.github.com/repos/neillturner/kitchen-ansible/issues/113","id":164698305,"user":{"login":"neillturner","id":408419,"avatar_url":"https://avatars.githubusercontent.com/u/408419?v=3","gravatar_id":"","url":"https://api.github.com/users/neillturner","html_url":"https://github.com/neillturner","followers_url":"https://api.github.com/users/neillturner/followers","following_url":"https://api.github.com/users/neillturner/following{/other_user}","gists_url":"https://api.github.com/users/neillturner/gists{/gist_id}","starred_url":"https://api.github.com/users/neillturner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neillturner/subscriptions","organizations_url":"https://api.github.com/users/neillturner/orgs","repos_url":"https://api.github.com/users/neillturner/repos","events_url":"https://api.github.com/users/neillturner/events{/privacy}","received_events_url":"https://api.github.com/users/neillturner/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T09:27:46Z","updated_at":"2015-12-15T09:27:46Z","body":"ok I will add a cd /tmp/kitchen  when there is a ansible.cfg file. "}}