mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Pass the absolute path to dirname when assigning basedir (#17457)
* 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())
This commit is contained in:
parent
89c826df9d
commit
e0a77bb8d5
1 changed files with 1 additions and 1 deletions
|
@ -195,7 +195,7 @@ class PlaybookExecutor:
|
||||||
if C.RETRY_FILES_SAVE_PATH:
|
if C.RETRY_FILES_SAVE_PATH:
|
||||||
basedir = C.shell_expand(C.RETRY_FILES_SAVE_PATH)
|
basedir = C.shell_expand(C.RETRY_FILES_SAVE_PATH)
|
||||||
elif playbook_path:
|
elif playbook_path:
|
||||||
basedir = os.path.dirname(playbook_path)
|
basedir = os.path.dirname(os.path.abspath(playbook_path))
|
||||||
else:
|
else:
|
||||||
basedir = '~/'
|
basedir = '~/'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue