From 059008aed2b7fb0e2f9399d4a7cfbd18d71ef801 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 12 Feb 2016 09:16:24 -0700 Subject: [PATCH] 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 --- teuthology/task/ansible.py | 4 ---- teuthology/test/task/test_ansible.py | 2 -- 2 files changed, 6 deletions(-) diff --git a/teuthology/task/ansible.py b/teuthology/task/ansible.py index 708cc3bf30..f290682399 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 3c325b5c59..09131c32e1 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): -- 2.39.5