diff --git a/forge-pod.yml b/forge-pod.yml index b97f31f..628c1be 100644 --- a/forge-pod.yml +++ b/forge-pod.yml @@ -5,7 +5,7 @@ kind: Pod metadata: name: ublue-os_forge spec: - restartPolicy: Always + restartPolicy: OnFailure volumes: - name: ublue-os_forge-certs-pvc persistentVolumeClaim: @@ -74,6 +74,11 @@ spec: subPath: ssh name: ublue-os_forge-certs-pvc readOnly: true + workingDir: /ansible + command: + - ansible-playbook + args: + - main.yml resources: limits: memory: 512Mi diff --git a/setup/Containerfile b/setup/Containerfile index a8f759e..f3844d0 100644 --- a/setup/Containerfile +++ b/setup/Containerfile @@ -1,11 +1,7 @@ # Source Image FROM docker.io/library/python:alpine3.17 -# Install ansible setup project +# Install ansible and dependencies WORKDIR /ansible COPY ./ansible . RUN pip3 install -r ./requirements.txt -RUN chmod +x ./startup.sh - -# Container start command -CMD ["/ansible/startup.sh"] diff --git a/setup/ansible/startup.sh b/setup/ansible/startup.sh deleted file mode 100644 index c64be9f..0000000 --- a/setup/ansible/startup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# Run setup only once -if [ ! -f /ansible/.startup-done ]; then - ansible-playbook main.yml - touch /ansible/.startup-done -fi