mirror of
https://github.com/mpolden/echoip.git
synced 2025-07-17 22:43:36 +02:00
Use salt for provisioning
This commit is contained in:
1
salt/minion.yml
Normal file
1
salt/minion.yml
Normal file
@ -0,0 +1 @@
|
||||
file_client: local
|
20
salt/roots/dev.sls
Normal file
20
salt/roots/dev.sls
Normal 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
|
4
salt/roots/files/dot.bash_profile
Normal file
4
salt/roots/files/dot.bash_profile
Normal 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
|
1
salt/roots/files/golang.sh
Normal file
1
salt/roots/files/golang.sh
Normal file
@ -0,0 +1 @@
|
||||
test -d /usr/local/go/bin && export PATH=/usr/local/go/bin:$PATH
|
14
salt/roots/golang.sls
Normal file
14
salt/roots/golang.sls
Normal 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
7
salt/roots/ntp.sls
Normal file
@ -0,0 +1,7 @@
|
||||
Europe/Oslo:
|
||||
timezone.system
|
||||
ntp:
|
||||
pkg:
|
||||
- installed
|
||||
service:
|
||||
- running
|
6
salt/roots/top.sls
Normal file
6
salt/roots/top.sls
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
base:
|
||||
'*':
|
||||
- ntp
|
||||
- dev
|
||||
- golang
|
Reference in New Issue
Block a user