Add Ansible provisioning of Vagrant env

This commit is contained in:
Martin Polden
2014-01-26 20:59:29 +01:00
parent 137052410b
commit a67a47a93f
10 changed files with 74 additions and 23 deletions

2
provisioning/development Normal file
View File

@ -0,0 +1,2 @@
[development]
172.16.5.10

View File

@ -0,0 +1,7 @@
---
- hosts: development
sudo: yes
roles:
- ntp
- golang
- vagrant

View File

@ -0,0 +1 @@
test -d /usr/local/go/bin && export PATH=/usr/local/go/bin:$PATH

View File

@ -0,0 +1,11 @@
---
- name: install golang
shell: curl https://go.googlecode.com/files/go1.2.linux-amd64.tar.gz | tar -zxC /usr/local
creates=/usr/local/go
- name: configure path
copy: src=golang.sh
dest=/etc/profile.d/golang.sh
owner=root
group=root
mode=0644

View File

@ -0,0 +1 @@
Europe/Oslo

View File

@ -0,0 +1,3 @@
---
- name: update timezone
command: dpkg-reconfigure --frontend=noninteractive tzdata

View File

@ -0,0 +1,15 @@
---
- name: set timezone
copy: src=timezone
dest=/etc/timezone
owner=root
group=root
mode=0644
notify:
- update timezone
- name: install ntp
apt: pkg=ntp state=latest
- name: make sure ntp is running
service: name=ntp state=running enabled=yes

View File

@ -0,0 +1,2 @@
export GOPATH=/vagrant
cd /vagrant

View File

@ -0,0 +1,24 @@
---
- name: install packages
apt: pkg={{ item }} state=latest update_cache=yes cache_valid_time=3600
with_items:
- gdb
- git
- make
- mercurial
environment:
LANG: en_US.UTF-8
- name: hide login message
copy: dest=/home/vagrant/.hushlogin
content=
owner=vagrant
group=vagrant
mode=0644
- name: install bash_profile
copy: src=dot.bash_profile
dest=/home/vagrant/.bash_profile
owner=vagrant
group=vagrant
mode=0644