Skip to content
This repository was archived by the owner on Feb 11, 2025. It is now read-only.

Commit 4d0b34d

Browse files
authored
Merge pull request #24 from fullstack-devops/bugfix/add-ansible-to-fullstacked
add ansible to fullstacked
2 parents 54c131a + d6bb7d7 commit 4d0b34d

File tree

5 files changed

+27
-11
lines changed

5 files changed

+27
-11
lines changed

images/ansible-k8s/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ USER ${USERNAME}
5252

5353
RUN pip3 install ${PACKAGES_PYTHON} --user
5454

55-
RUN ansible-galaxy install -c -r ${TMP_DIR}/requirements.yml
55+
# RUN ansible-galaxy install -c -r ${TMP_DIR}/requirements.yml
5656
RUN ansible-galaxy collection install -c -r ${TMP_DIR}/requirements.yml
5757

5858
# install helm plugins helm push, appr && diff

images/ansible-k8s/requirements.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
---
2-
roles:
3-
- name: geerlingguy.helm
4-
version: 1.0.1
5-
62
collections:
73
- name: kubernetes.core
8-
version: 2.2.2
4+
version: 2.3.1

images/base/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM ubuntu:20.04
22

33
ARG UBUNTU_VERSION=20.04
44
ARG DEBIAN_FRONTEND=noninteractive
5-
ARG PACKAGES="libffi-dev libicu-dev build-essential libssl-dev ca-certificates software-properties-common jq sed grep git curl wget zip python3-pip "
5+
ARG PACKAGES="libffi-dev libicu-dev build-essential libssl-dev ca-certificates software-properties-common jq sed grep git curl wget zip python3-pip"
66

77
ENV USERNAME="runner"
88
ENV UBUNTU_VERSION=20.04

images/fullstacked/Dockerfile

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,17 @@ FROM ghcr.io/fullstack-devops/github-actions-runner:base-latest
33
USER root
44
# install packages along with jq so we can parse JSON
55
# add additional packages as necessary
6-
ARG PACKAGES="openjdk-11-jdk maven nodejs"
6+
ARG PACKAGES="openjdk-11-jdk maven nodejs ansible"
7+
ARG PACKAGES_PYTHON="kubernetes"
78

89
RUN apt-get update \
10+
&& add-apt-repository -y --update ppa:ansible/ansible \
911
&& curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
1012
&& apt-get install -y --no-install-recommends ${PACKAGES} \
1113
&& rm -rf /var/lib/apt/lists/* \
1214
&& apt-get clean
1315

14-
ENV GH_RUNNER_LABELS="ubuntu-20.04,maven,openjdk-11,nodejs,go,yarn,helm"
16+
ENV GH_RUNNER_LABELS="ubuntu-20.04,maven,openjdk-11,nodejs,go,yarn,helm,ansible"
1517
# https://github.com/helm/helm/releases
1618
ARG HELM_VERSION=3.8.1
1719
# https://go.dev/dl/
@@ -29,13 +31,27 @@ RUN export ARCH=$(/helper-scripts/translate-aarch.sh a-short) \
2931
&& rm -rf /usr/local/src/go.linux.tar.gz \
3032
&& ln -s /usr/local/src/go/bin/go /usr/local/bin/
3133

32-
# install npm tools: yarn
33-
RUN npm install --global yarn @angular/cli@13
34+
35+
ENV TMP_DIR=/home/${USERNAME}/tmp
36+
37+
RUN mkdir /home/${USERNAME}/.ansible
38+
RUN mkdir ${TMP_DIR}
39+
40+
COPY requirements.yml ${TMP_DIR}/requirements.yml
3441

3542
RUN mkdir -p /home/${USERNAME}/.m2/ \
3643
&& chown -R ${USERNAME} /home/${USERNAME}
44+
45+
# install npm tools: yarn
46+
RUN npm install --global yarn @angular/cli@13
47+
3748
USER ${USERNAME}
3849

50+
RUN pip3 install ${PACKAGES_PYTHON} --user
51+
52+
# RUN ansible-galaxy install -c -r ${TMP_DIR}/requirements.yml
53+
RUN ansible-galaxy collection install -c -r ${TMP_DIR}/requirements.yml
54+
3955
# install helm plugins helm push, appr && diff
4056
RUN helm plugin install --version 0.10.2 https://github.com/chartmuseum/helm-push.git \
4157
&& helm plugin install --version 0.7.0 https://github.com/app-registry/appr-helm-plugin.git \

images/fullstacked/requirements.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
collections:
3+
- name: kubernetes.core
4+
version: 2.3.1

0 commit comments

Comments
 (0)