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 | |
| # Set this script as the AWS user-data for a fresh CentOS AMI | |
| # It will be run on startup, and logs to /var/log/cloud-init.log | |
| rpm -iUvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
| yum -y update | |
| yum -y install epel-release | |
| yum -y install ansible | |
| yum -y install git | |
| mkdir -p /home/centos/.ssh | |
| cat <<EOF > /home/centos/.ssh/id_rsa |
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
| host github.com | |
| user git | |
| hostname ssh.github.com | |
| port 443 | |
| proxycommand socat - PROXY:<hostname>:%h:%p,proxyport=<port> |