mirror of
https://github.com/jbowdre/vagrant-saltlab.git
synced 2024-11-26 23:22:17 +00:00
commit
60fcf707f1
13 changed files with 18 additions and 7 deletions
25
Vagrantfile
vendored
25
Vagrantfile
vendored
|
@ -13,23 +13,34 @@ Vagrant.configure("2") do |config|
|
||||||
salt.vm.provider :libvirt do |libvirt|
|
salt.vm.provider :libvirt do |libvirt|
|
||||||
libvirt.memory = 1024
|
libvirt.memory = 1024
|
||||||
end
|
end
|
||||||
salt.vm.synced_folder 'srv', '/srv', type: 'rsync'
|
# salt.vm.synced_folder 'srv', '/srv', type: 'rsync'
|
||||||
salt.vm.provision "shell", inline: <<-SHELL
|
salt.vm.provision "shell", inline: <<-SHELL
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install curl vim -y
|
apt-get install curl vim python3-pygit2 -y
|
||||||
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
|
curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io
|
||||||
sh bootstrap-salt.sh -M -X -U
|
sh bootstrap-salt.sh -M -X -U
|
||||||
cat << EOF > /etc/salt/master.d/lab.conf
|
cat << EOF > /etc/salt/master.d/lab.conf
|
||||||
auto_accept: True
|
auto_accept: True
|
||||||
file_roots:
|
file_roots:
|
||||||
base:
|
base:
|
||||||
- /srv/salt
|
- /srv/
|
||||||
pillar_roots:
|
fileserver_backend:
|
||||||
base:
|
- roots
|
||||||
- /srv/pillar
|
- gitfs
|
||||||
|
gitfs_provider: pygit2
|
||||||
|
gitfs_update_interval: 60
|
||||||
|
gitfs_base: main
|
||||||
|
gitfs_remotes:
|
||||||
|
- https://github.com/jbowdre/vagrant-saltlab.git:
|
||||||
|
- root: salt_content/salt
|
||||||
|
- mountpoint: salt://
|
||||||
|
ext_pillar:
|
||||||
|
- git:
|
||||||
|
- main https://github.com/jbowdre/vagrant-saltlab.git:
|
||||||
|
- root: pillar
|
||||||
reactor:
|
reactor:
|
||||||
- 'salt/minion/*/start':
|
- 'salt/minion/*/start':
|
||||||
- /srv/reactor/sync_grains.sls
|
- salt://_reactor/sync_grains.sls
|
||||||
EOF
|
EOF
|
||||||
systemctl start salt-master
|
systemctl start salt-master
|
||||||
systemctl start salt-minion
|
systemctl start salt-minion
|
||||||
|
|
Loading…
Reference in a new issue