From: Zack Cerza Date: Fri, 12 Feb 2016 16:16:24 +0000 (-0700) Subject: ansible: Don't modify plays X-Git-Tag: 1.1.0~675^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=059008aed2b7fb0e2f9399d4a7cfbd18d71ef801;p=teuthology.git ansible: Don't modify plays We were applying hosts=all to each play when using a generated playbook. I can't remember why I thought that was a good idea, and it's tripping up CephAnsible. Signed-off-by: Zack Cerza --- diff --git a/teuthology/task/ansible.py b/teuthology/task/ansible.py index 708cc3bf3..f29068239 100644 --- a/teuthology/task/ansible.py +++ b/teuthology/task/ansible.py @@ -217,10 +217,6 @@ class Ansible(Task): Generate a playbook file to use. This should not be called if we're using an existing file. """ - for play in self.playbook: - # Ensure each play is applied to all hosts mentioned in the --limit - # flag we specify later - play['hosts'] = 'all' pb_buffer = StringIO() pb_buffer.write('---\n') yaml.safe_dump(self.playbook, pb_buffer) diff --git a/teuthology/test/task/test_ansible.py b/teuthology/test/task/test_ansible.py index 3c325b5c5..09131c32e 100644 --- a/teuthology/test/task/test_ansible.py +++ b/teuthology/test/task/test_ansible.py @@ -238,8 +238,6 @@ class TestAnsibleTask(TestTask): assert task.playbook_file == playbook_file_obj playbook_file_obj.seek(0) playbook_result = yaml.safe_load(playbook_file_obj) - for play in playbook: - play['hosts'] = 'all' assert playbook_result == playbook def test_execute_playbook(self):