Fixed stuff
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -0,0 +1 @@
|
|||||||
|
.idea
|
||||||
10
Dockerfile
10
Dockerfile
@@ -4,16 +4,14 @@ FROM public.ecr.aws/docker/library/node:22-alpine3.20
|
|||||||
ENV PATH=/root/.local/bin:$PATH
|
ENV PATH=/root/.local/bin:$PATH
|
||||||
|
|
||||||
# Install git for gitea actions and ansible
|
# Install git for gitea actions and ansible
|
||||||
RUN <<EOF
|
RUN apk add --no-cache bash curl python3 pipx git rsync unzip openssh
|
||||||
set -e
|
RUN pipx install --include-deps ansible
|
||||||
apk add --no-cache bash curl python3 pipx git rsync unzip openssh
|
|
||||||
pipx install --include-deps ansible
|
|
||||||
EOF
|
|
||||||
|
|
||||||
ENV PY_COLOR="1"
|
ENV PY_COLOR="1"
|
||||||
ENV ANSIBLE_FORCE_COLOR="1"
|
ENV ANSIBLE_FORCE_COLOR="1"
|
||||||
|
|
||||||
|
WORKDIR /usr/src
|
||||||
COPY entrypoint.sh .
|
COPY entrypoint.sh .
|
||||||
|
|
||||||
RUN chmod +x /usr/src/entrypoint.sh
|
RUN chmod +x /usr/src/entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT ["ash","-c","/usr/src/entrypoint.sh"]
|
ENTRYPOINT ["ash","-c","/usr/src/entrypoint.sh"]
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ author: Skydust
|
|||||||
|
|
||||||
# Define your inputs here.
|
# Define your inputs here.
|
||||||
inputs:
|
inputs:
|
||||||
path:
|
playbook:
|
||||||
description: The playbook's path
|
description: The playbook's path
|
||||||
required: true
|
required: true
|
||||||
check_only:
|
only_check:
|
||||||
description: Whether to only check without changes
|
description: Whether to only check without changes
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
@@ -15,6 +15,3 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: docker
|
using: docker
|
||||||
image: Dockerfile
|
image: Dockerfile
|
||||||
env:
|
|
||||||
INPUT_PATH: ${{ inputs.path }}
|
|
||||||
INPUT_CHECK_ONLY: ${{ inputs.check_only }}
|
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
#!/usr/bin/env ash
|
#!/usr/bin/env ash
|
||||||
|
|
||||||
|
INPUT_PLAYBOOK_PATH="$playbook"
|
||||||
|
INPUT_ONLY_CHECK="$only_check"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$INPUT_CHECK_ONLY" = "true" ]; then
|
ANSIBLE_OPTIONS="-vv"
|
||||||
ANSIBLE_OPTIONS="--check --diff"
|
|
||||||
|
if [ "$INPUT_ONLY_CHECK" = "true" ]; then
|
||||||
|
ANSIBLE_OPTIONS="${ANSIBLE_OPTIONS} --check --diff"
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
ansible-playbook "$INPUT_PATH" -vv "$ANSIBLE_OPTIONS"
|
echo "Running playbook with options: ansible-playbook $ANSIBLE_OPTIONS \"$INPUT_PLAYBOOK_PATH\""
|
||||||
|
ansible-playbook $ANSIBLE_OPTIONS "$INPUT_PLAYBOOK_PATH"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user