Skip to content

Commit

Permalink
Guarantee collection base path exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Shrews committed Jun 17, 2024
1 parent e55255d commit c51543f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ansible_builder/containerfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,10 @@ def _prepare_galaxy_install_steps(self) -> None:
# in the final image.
env = "ANSIBLE_GALAXY_DISABLE_GPG_VERIFY=1 "

# If nothing actually gets installed, make sure this directory will exist
# to prevent the COPY step from failing later.
self.steps.append(f"RUN mkdir {os.path.dirname(constants.base_collections_path.rstrip('/'))}")

self.steps.append(
f"RUN ansible-galaxy role install $ANSIBLE_GALAXY_CLI_ROLE_OPTS "
f"-r {constants.STD_GALAXY_FILENAME}"
Expand Down

0 comments on commit c51543f

Please sign in to comment.