diff options
-rw-r--r-- | ansible/Dockerfile | 14 | ||||
-rw-r--r-- | ansible/ansible-build.sh | 1 | ||||
-rw-r--r-- | ansible/ansible-config.sh | 1 | ||||
-rwxr-xr-x | ansible/ansible.sh | 19 | ||||
-rw-r--r-- | setup/configs/openshift.yml | 3 | ||||
-rw-r--r-- | setup/users/htpasswd | 1 |
6 files changed, 38 insertions, 1 deletions
diff --git a/ansible/Dockerfile b/ansible/Dockerfile new file mode 100644 index 0000000..c654f6a --- /dev/null +++ b/ansible/Dockerfile @@ -0,0 +1,14 @@ +FROM cytopia/ansible:2.10-tools + +ENV PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 + +RUN apk add --no-cache \ + bash openssh sshpass rsync curl jq git vim less \ + py3-netaddr \ + py3-paramiko py3-cryptography \ + py3-lxml py3-requests py3-yaml \ + py3-jmespath py3-xmltodict py3-jsonschema py3-psutil + +WORKDIR /work +CMD ["ansible", "--version"] diff --git a/ansible/ansible-build.sh b/ansible/ansible-build.sh new file mode 100644 index 0000000..74576da --- /dev/null +++ b/ansible/ansible-build.sh @@ -0,0 +1 @@ +docker build -t ansible:2.10-cytopia-plus . diff --git a/ansible/ansible-config.sh b/ansible/ansible-config.sh new file mode 100644 index 0000000..f1b2367 --- /dev/null +++ b/ansible/ansible-config.sh @@ -0,0 +1 @@ +for c in ansible ansible-playbook ansible-vault ansible-config ansible-console ansible-doc ansible-galaxy ansible-inventory ansible-pull ansible-test ansible-connection; do ln -sf /root/ansible.sh /usr/bin/$c; done diff --git a/ansible/ansible.sh b/ansible/ansible.sh new file mode 100755 index 0000000..7d50833 --- /dev/null +++ b/ansible/ansible.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -euo pipefail +IMG=ansible:2.10-cytopia-plus +SSH_ARGS=() + +#[[ -n "${SSH_AUTH_SOCK:-}" && -S "$SSH_AUTH_SOCK" ]] && SSH_ARGS=(-v "$SSH_AUTH_SOCK":/ssh-agent -e SSH_AUTH_SOCK=/ssh-agent) + + + +cmd="$(basename "$0")" + +exec docker run --rm -it \ + -u "$(id -u):$(id -g)" \ + -v "/root/ands":/root/ands -w /root/ands \ + -v "$HOME/.ssh":/root/.ssh:ro \ + -v "$HOME/.ansible":/root/.ansible \ + "${SSH_ARGS[@]}" \ + "$IMG" "$cmd" "$@"
\ No newline at end of file diff --git a/setup/configs/openshift.yml b/setup/configs/openshift.yml index 767ac78..b6b0a04 100644 --- a/setup/configs/openshift.yml +++ b/setup/configs/openshift.yml @@ -31,11 +31,12 @@ ands_openshift_users: gil: { name: "Woosik Gil", email: "gil@kit.edu" } jhar: { name: "Julius Hartmann", email: "julius.hartmann@kit.edu" } bbieringer: { name: "Benedikt Bieringer", email: "benedikt.b@uni-muenster.de" } + fynn: { name: "Fynn Tschacher", email: "fynn.tschacher@student.kit.edu" } ands_openshift_roles: cluster-admin: csa, jalal, jan, ntj kaas/admin: csa, jalal, kopmann, ntj, bbieringer - katrin/admin: katrin, jalal, jan, ntj, bbieringer + katrin/admin: katrin, jalal, jan, ntj, bbieringer, fynn status/admin: katrin, jalal, ntj, bbieringer adei/admin: csa adei/view: pdv, kopmann, jalal, ntj diff --git a/setup/users/htpasswd b/setup/users/htpasswd index 5788f55..f1027f4 100644 --- a/setup/users/htpasswd +++ b/setup/users/htpasswd @@ -10,3 +10,4 @@ gil:$apr1$p2khs49v$7poH4dUbTpCyhEO5JmgLx0 jhar:$apr1$pDAXDbT4$r2f1SP5D71KplWZKLNi27. fawez:$apr1$yqROFhQ9$QdvOPFZ3zAbmtI9Dv53WU. bbieringer:$apr1$JqJxhUCR$5KfXdYvZzBFBbNm.mnrtd. +fynn:$2y$05$3jGd00iMyFrLLAsFOrfRBOM5pEBnM1U6zIso/bM5NzNM3pmiKIa86 |