]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
ansible: Run ansible-playbook in repo dir
authorZack Cerza <zack@redhat.com>
Wed, 10 Feb 2016 23:11:21 +0000 (16:11 -0700)
committerZack Cerza <zack@redhat.com>
Thu, 18 Feb 2016 21:31:14 +0000 (14:31 -0700)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/task/ansible.py
teuthology/test/task/test_ansible.py

index 7502aa56237a066311dea4f2aa049d0bc2443010..708cc3bf30fc32cb533c5627060ecd3f6e6cba47 100644 (file)
@@ -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,
index b35dcac94afc76c5bb50aca09dc1c042a6d8d91b..3c325b5c592a2b398c9ee33b5b73a48f6d1e2acd 100644 (file)
@@ -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,