diff --git a/Containerfile b/Containerfile index 14786cc..57491b4 100644 --- a/Containerfile +++ b/Containerfile @@ -1,6 +1,7 @@ ARG PYTHON_VERSION=3.12 FROM python:${PYTHON_VERSION}-slim-bookworm as builder +ARG VERSION ARG USER_ID=45000 ARG GROUP_ID=45000 ARG GROUP_ID_DOCKER=999 @@ -61,6 +62,17 @@ useradd -l -g dragon -G docker -u "$USER_ID" -m -d /ansible dragon # prepare release repository git clone https://github.com/osism/release /release +# prepare project repository +git clone https://github.com/osism/defaults /defaults +( cd /defaults || exit; git fetch --all --force; git checkout "$(yq -M -r .defaults_version "/release/$VERSION/base.yml")" ) + +git clone https://github.com/osism/cfg-generics /generics +( cd /generics || exit; git fetch --all --force; git checkout "$(yq -M -r .generics_version "/release/$VERSION/base.yml")" ) + +# add inventory files +mkdir -p /ansible/inventory.generics /ansible/inventory +cp /generics/inventory/* /ansible/inventory.generics + # run preparations python3 /src/render-python-requirements.py diff --git a/files/src/requirements.txt b/files/src/requirements.txt index 28e8943..fd250d7 100644 --- a/files/src/requirements.txt +++ b/files/src/requirements.txt @@ -1,2 +1,3 @@ Jinja2==3.1.4 PyYAML==6.0.1 +yq==3.4.3