Created
January 24, 2014 23:01
-
-
Save thinkAmi/8608604 to your computer and use it in GitHub Desktop.
GDG信州 2014.Jan での発表時のコード
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
| site :opscode | |
| metadata | |
| cookbook 'git' |
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
| # | |
| # Cookbook Name:: gdg-shinshu-201401 | |
| # Recipe:: default | |
| # | |
| # Copyright (C) 2014 YOUR_NAME | |
| # | |
| # All rights reserved - Do Not Redistribute | |
| # | |
| script "show_git_branch" do | |
| interpreter "bash" | |
| user "root" | |
| code <<-'EOL' | |
| wget https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -P /home/vagrant | |
| chmod -R 777 /home/vagrant/git-completion.bash | |
| echo source /home/vagrant/git-completion.bash >> /home/vagrant/.bashrc | |
| echo GIT_PS1_SHOWDIRTYSTATE=true >> /home/vagrant/.bashrc | |
| echo -n export PS1=\' >> /home/vagrant/.bashrc | |
| echo -n '\[\033[01;32m\]\u@\[\033[01;33m\] \w$(__git_ps1) \[\033[01;34m\]\$\[\033[00m\] ' >> /home/vagrant/.bashrc | |
| echo \' >> /home/vagrant/.bashrc | |
| source /home/vagrant/.bashrc | |
| EOL | |
| end |
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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.require_plugin "vagrant-berkshelf" | |
| Vagrant.require_plugin "vagrant-omnibus" | |
| Vagrant.configure("2") do |config| | |
| config.vm.hostname = "gdg-shinshu-201401-berkshelf" | |
| config.vm.box = "ubuntu120403" | |
| config.vm.network :private_network, ip: "33.33.33.10" | |
| config.vm.provider :virtualbox do |vb| | |
| vb.gui = true | |
| end | |
| config.berkshelf.enabled = true | |
| config.vm.provision :chef_solo do |chef| | |
| chef.run_list = [ | |
| "git", | |
| "recipe[gdg-shinshu-201401::default]" | |
| ] | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment