From: Zack Cerza Date: Wed, 10 Feb 2016 23:11:21 +0000 (-0700) Subject: ansible: Run ansible-playbook in repo dir X-Git-Tag: 1.1.0~675^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b4190d05aae039c2a391b232a867f9fe653fc2b9;p=teuthology.git ansible: Run ansible-playbook in repo dir Signed-off-by: Zack Cerza --- diff --git a/teuthology/task/ansible.py b/teuthology/task/ansible.py index 7502aa562..708cc3bf3 100644 --- a/teuthology/task/ansible.py +++ b/teuthology/task/ansible.py @@ -257,6 +257,7 @@ class Ansible(Task): out_log = self.log.getChild('out') out, status = pexpect.run( command, + cwd=self.repo_path, logfile=_logfile or LoggerFile(out_log, logging.INFO), withexitstatus=True, timeout=None, diff --git a/teuthology/test/task/test_ansible.py b/teuthology/test/task/test_ansible.py index b35dcac94..3c325b5c5 100644 --- a/teuthology/test/task/test_ansible.py +++ b/teuthology/test/task/test_ansible.py @@ -264,6 +264,7 @@ class TestAnsibleTask(TestTask): task.execute_playbook(_logfile=logger) m_run.assert_called_once_with( ' '.join(args), + cwd=task.repo_path, logfile=logger, withexitstatus=True, timeout=None,