]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
ansible: Don't modify plays
authorZack Cerza <zack@redhat.com>
Fri, 12 Feb 2016 16:16:24 +0000 (09:16 -0700)
committerZack Cerza <zack@redhat.com>
Thu, 18 Feb 2016 21:31:15 +0000 (14:31 -0700)
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 <zack@redhat.com>
teuthology/task/ansible.py
teuthology/test/task/test_ansible.py

index 708cc3bf30fc32cb533c5627060ecd3f6e6cba47..f290682399d81b1913ae2754ad34cdee1527f3df 100644 (file)
@@ -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)
index 3c325b5c592a2b398c9ee33b5b73a48f6d1e2acd..09131c32e123ee77bc21abc5e27497a0b19d99db 100644 (file)
@@ -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):