mirror of
https://github.com/ublue-os/forge.git
synced 2025-07-12 20:55:47 +03:00
wip - load ansible settings from VARS and not from ansible.cfg
This commit is contained in:
parent
50395caec7
commit
aa5377e6d7
9 changed files with 43 additions and 30 deletions
|
@ -2,19 +2,31 @@
|
|||
FROM docker.io/library/python:3.11-alpine3.19
|
||||
|
||||
# Environment vars
|
||||
ENV PROJECT_DIR="/anvil"
|
||||
ENV ANSIBLE_DIR="${PROJECT_DIR}/ansible"
|
||||
ENV NICEGUI_DIR="${PROJECT_DIR}/nicegui"
|
||||
ENV PIPX_BIN_DIR="/usr/local/py-utils"
|
||||
ENV PIPX_HOME="/usr/local/pipx"
|
||||
ENV POETRY_VERSION="1.8.2"
|
||||
ENV POETRY_VIRTUALENVS_CREATE="true"
|
||||
ENV POETRY_VIRTUALENVS_IN_PROJECT="true"
|
||||
ENV PATH="${PATH}:${PIPX_BIN_DIR}:${PIPX_HOME}/venvs/poetry/bin:/anvil/.venv/bin"
|
||||
ENV PATH="${PATH}:${PIPX_BIN_DIR}:${PIPX_HOME}/venvs/poetry/bin:/${PROJECT_DIR}/.venv/bin"
|
||||
## Ansible settings
|
||||
ENV ANSIBLE_INVENTORY="${ANSIBLE_DIR}/inventory.yml"
|
||||
ENV ANSIBLE_ROLES_PATH="${ANSIBLE_DIR}/roles"
|
||||
ENV ANSIBLE_COLLECTIONS_PATH="${ANSIBLE_DIR}/collections"
|
||||
ENV ANSIBLE_PRIVATE_KEY_FILE="/certs/ssh/ublue-os_forge-id_ed25519"
|
||||
ENV ANSIBLE_DISPLAY_SKIPPED_HOSTS="False"
|
||||
ENV ANSIBLE_STDOUT_CALLBACK="yaml"
|
||||
ENV ANSIBLE_CALLBACKS_ENABLED="ansible.posix.profile_tasks"
|
||||
ENV ANSIBLE_HOST_KEY_CHECKING="False"
|
||||
|
||||
# Install system dependencies
|
||||
RUN apk --no-cache add pipx openssh bash
|
||||
RUN pipx install poetry==${POETRY_VERSION}
|
||||
|
||||
# Install ansible and dependencies
|
||||
WORKDIR /anvil
|
||||
WORKDIR ${PROJECT_DIR}
|
||||
COPY . .
|
||||
RUN poetry install --no-root
|
||||
CMD poetry env use .venv/bin/python && \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue