Last active
June 20, 2017 13:20
-
-
Save ddepaoli3/acfa1bbaa0c690fae4f3dcde47b0d642 to your computer and use it in GitHub Desktop.
Bootstrap to install and configure ubuntu 16.04 to allow it to run ansible locally and to clone git repo from codecommit
This file contains hidden or 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 | |
#Install prerequisities | |
sudo apt-get update | |
sudo apt-get install --yes python2.7 git ansible awscli | |
#Go to home | |
export HOME='/root' | |
cd $HOME | |
#Git cloning | |
git config --global credential.helper '!aws codecommit credential-helper $@' | |
git config --global credential.UseHttpPath true | |
git clone https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/repositoryname | |
#Execute ansible | |
cd $HOME/repositoryname | |
ansible-playbook -i "localhost,groupname" -c local main.yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment