Created
May 20, 2015 00:25
-
-
Save localdisk/42fabd99a71a6f903f7d to your computer and use it in GitHub Desktop.
ゲストOSにAnsibleインストール
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
| #!/usr/bin/env bash | |
| ansible_conf="/home/vagrant/.ansible.cfg" | |
| if ! [ `which ansible` ]; then | |
| sudo yum -y update | |
| sudo yum -y install python-setuptools python-devel | |
| sudo yum -y groupinstall "Development Tools" | |
| sudo easy_install pip | |
| sudo pip install ansible | |
| fi | |
| sudo yum -y update kernel | |
| sudo yum -y install kernel-devel kernel-headers dkms gcc gcc-c++ | |
| if ! [ -e $ansible_conf ]; then | |
| touch $ansible_conf | |
| echo "[defaults] " >> $ansible_conf | |
| echo "log_path=/vagrant/ansible.log" >> $ansible_conf | |
| fi | |
| sudo cp -p /vagrant/ansible/development /home/vagrant/ | |
| sudo chmod -x /home/vagrant/development | |
| ansible-playbook -i /home/vagrant/development /vagrant/ansible/site.yml | |
| #export KERN_DIR=`ls -t /usr/src/kernels/ | head -1` && sudo /etc/init.d/vboxadd setup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment