#58578 support absolute paths additionally (#58812)

* support absolute paths additionally

* add changelog

* rename changelog

* fix changelog to bugfix
This commit is contained in:
Adam 2019-12-21 18:49:38 +07:00 committed by Felix Fontein
parent 663171e218
commit e711d01ed1
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,3 @@
---
bugfixes:
- terraform - adding support for absolute paths additionally to the relative path within project_path (https://github.com/ansible/ansible/issues/58578)

View file

@ -350,7 +350,7 @@ def main():
if state == 'absent':
command.extend(variables_args)
elif state == 'present' and plan_file:
if os.path.exists(project_path + "/" + plan_file):
if any([os.path.isfile(project_path + "/" + plan_file), os.path.isfile(plan_file)]):
command.append(plan_file)
else:
module.fail_json(msg='Could not find plan_file "{0}", check the path and try again.'.format(plan_file))