Use salt for provisioning

This commit is contained in:
Martin Polden
2014-12-22 00:19:01 +01:00
parent bea550f669
commit 959c0a8360
16 changed files with 60 additions and 75 deletions

1
salt/minion.yml Normal file
View File

@ -0,0 +1 @@
file_client: local

20
salt/roots/dev.sls Normal file
View File

@ -0,0 +1,20 @@
packages:
pkg.installed:
- pkgs:
- git
- make
- mercurial
/home/vagrant/.hushlogin:
file.managed:
- contents: ""
- user: vagrant
- group: vagrant
- mode: 0644
/home/vagrant/.bash_profile:
file.managed:
- source: salt://files/dot.bash_profile
- user: vagrant
- group: vagrant
- mode: 0644

View File

@ -0,0 +1,4 @@
test -d $HOME/.local/bin || mkdir -p $HOME/.local/bin
export PATH=/vagrant/bin:$HOME/.local/bin:$PATH
export GOPATH=/vagrant
cd /vagrant

View File

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

14
salt/roots/golang.sls Normal file
View File

@ -0,0 +1,14 @@
curl:
pkg:
- installed
curl -L https://storage.googleapis.com/golang/go1.4.linux-amd64.tar.gz | tar -zxC /usr/local:
cmd.run:
- unless: test -d /usr/local/go
/etc/profile.d/golang.sh:
file.managed:
- source: salt://files/golang.sh
- user: root
- group: root
- mode: 0644

7
salt/roots/ntp.sls Normal file
View File

@ -0,0 +1,7 @@
Europe/Oslo:
timezone.system
ntp:
pkg:
- installed
service:
- running

6
salt/roots/top.sls Normal file
View File

@ -0,0 +1,6 @@
---
base:
'*':
- ntp
- dev
- golang