Created
September 26, 2018 14:22
-
-
Save psoliver92/dac4d96451cdd998834dd8e4b4f56ece to your computer and use it in GitHub Desktop.
Lambda deploy EC2 script init
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/bash | |
apt-get update | |
apt-get install git -qq -y | |
apt-get install python3.4-venv | |
cat > /home/id_rsa <<EOF | |
""" + id_rsa + """ | |
EOF | |
chmod 600 /home/id_rsa | |
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | |
echo 'host github.com' >> /etc/ssh/ssh_config | |
echo ' HostName github.com' >> /etc/ssh/ssh_config | |
echo ' IdentityFile /home/id_rsa' >> /etc/ssh/ssh_config | |
echo ' User git' >> /etc/ssh/ssh_config | |
echo ' IdentitiesOnly yes' >> /etc/ssh/ssh_config | |
git clone git@github.com:getdreams/dreams-ansible.git /home/dreams-ansible | |
export ANSIBLE_VAULT_PASSWORD='""" + ansible_vault_pwd + """' | |
cd /home/dreams-ansible | |
./bin/ansible-wrapper | |
./bin/run_build.sh | |
apt-get install rsync -qq -y | |
./bin/deploy dreams develop --limit=tag_Role_product_admin""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment