From e4ef3c8c1bbf0e4ebde8a5479fd7b79180080970 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 22 Oct 2025 07:55:05 +0200 Subject: Add Dockerfile and shell wrapper to make it work on the systems with newer version ansible --- ansible/ansible.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 ansible/ansible.sh (limited to 'ansible/ansible.sh') 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 -- cgit v1.2.3