Browse Source

Absolutize path for CIP output env

In the case where a relative path, or just a filename, is passed as
--output-env-file to container image prepare, the output file ends up
relative to the cli-container-image-prepare.yaml playbook.

In almost all cases, this is not what is expected, especially as the
output file could end up in the playbook directory. Instead, absolutize
the path, so that the output file ends up relative to the working
directory from where the command was run.

Signed-off-by: James Slagle <jslagle@redhat.com>
Change-Id: I9227365ef2900b1f077ac1abdcb4443957b15958
changes/23/781623/1
James Slagle 2 months ago
parent
commit
dc07649e8b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      tripleoclient/v1/container_image.py

+ 2
- 1
tripleoclient/v1/container_image.py View File

@ -1085,7 +1085,8 @@ class TripleOImagePrepare(command.Command):
extra_vars["debug"] = True
if parsed_args.output_env_file:
extra_vars["output_env_file"] = parsed_args.output_env_file
extra_vars["output_env_file"] = os.path.abspath(
parsed_args.output_env_file)
with oooutils.TempDirs() as tmp:
oooutils.run_ansible_playbook(


Loading…
Cancel
Save