diff --git a/lib/ansible/executor/playbook_executor.py b/lib/ansible/executor/playbook_executor.py index 6f38e8e8bc..8e02441ba0 100644 --- a/lib/ansible/executor/playbook_executor.py +++ b/lib/ansible/executor/playbook_executor.py @@ -27,6 +27,7 @@ from ansible import constants as C from ansible.executor.task_queue_manager import TaskQueueManager from ansible.playbook import Playbook from ansible.template import Templar +from ansible.utils.path import makedirs_safe from ansible.utils.unicode import to_unicode try: @@ -257,6 +258,7 @@ class PlaybookExecutor: re-running on ONLY the failed hosts. This may duplicate some variable information in group_vars/host_vars but that is ok, and expected. ''' + makedirs_safe(os.path.dirname(retry_path)) try: with open(retry_path, 'w') as fd: