* Pass the absolute path to dirname when assigning basedir
If no path is specified when calling the playbook, os.path.dirname(playbook_path) returns ''
This will cause failure when creating the retry file.
Fixes #17456
* Updated to use os.pathdirname(os.path.abspath())
... | ... |
@@ -187,7 +187,7 @@ class PlaybookExecutor: |
187 | 187 |
if C.RETRY_FILES_SAVE_PATH: |
188 | 188 |
basedir = C.shell_expand(C.RETRY_FILES_SAVE_PATH) |
189 | 189 |
elif playbook_path: |
190 |
- basedir = os.path.dirname(playbook_path) |
|
190 |
+ basedir = os.path.dirname(os.path.abspath(playbook_path)) |
|
191 | 191 |
else: |
192 | 192 |
basedir = '~/' |
193 | 193 |
|