Skip to content

Commit

Permalink
Merge pull request #406 from terrateamio/405-add-ansible-playbook-pro…
Browse files Browse the repository at this point in the history
…xy-bin

#405 ADD ansible-playbook proxy bin
  • Loading branch information
bender2352 authored Feb 27, 2025
2 parents 2b3e60e + 743fc0a commit e407060
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions proxy/bin/ansible-playbook
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#! /usr/bin/env bash

set -e
set -u

ANSIBLE_VERSION="${ANSIBLE_VERSION:-}"

if [ -f /usr/local/bin/ansible-playbook ]; then
exec /usr/local/bin/ansible-playbook "$@"
else
if [[ -n "$ANSIBLE_VERSION" ]]; then
flock /tmp/ansible-playbook-install pip install "ansible-core==$ANSIBLE_VERSION" ansible 1>&2
else
flock /tmp/ansible-playbook-install pip install ansible 1>&2
fi

exec /usr/local/bin/ansible-playbook "$@"
fi

0 comments on commit e407060

Please sign in to comment.