Created
April 4, 2017 22:11
-
-
Save libert-xyz/d34a2be702db66fdde365cb7fa553b25 to your computer and use it in GitHub Desktop.
ansible folder to base64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
ansible_configuration=$1 | |
shift | |
cat <<-EOF | |
#! /bin/bash | |
set -o errexit | |
mkdir -p /tmp/ansible | |
echo '$(tar c -C "$ansible_configuration" . | gzip -n | base64 -w 0)' | base64 -d | tar xz -C /tmp/ansible | |
cd /tmp/ansible | |
EOF | |
echo -n '/usr/bin/ansible-playbook playbook.yml --connection=local -i hosts' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment