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>
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)
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):