Skip to content

Instantly share code, notes, and snippets.

@jsrn

jsrn/Vagrantfile

Created Feb 26, 2015
Embed
What would you like to do?
Deploying Dionaea with Vagrant and Salt
#!/usr/bin/env bash
echo "192.168.1.64 salt" >> "/etc/hosts"
sudo salt-minion -d
dionaea-ppa:
pkgrepo.managed:
- ppa: honeynet/nightly
dionaea:
pkg.installed:
- pkgs:
- dionaea
/var/dionaea:
file.directory:
- user: nobody
- group: nogroup
/var/dionaea/wwwroot:
file.directory:
- user: nobody
- group: nogroup
/var/dionaea/binaries:
file.directory:
- user: nobody
- group: nogroup
/var/dionaea/log:
file.directory:
- user: nobody
- group: nogroup
sudo mv /etc/dionaea/dionaea.conf.dist /etc/dionaea/dionaea.conf:
cmd:
- run
sudo sed -i 's/var\/dionaea\///g' /etc/dionaea/dionaea.conf:
cmd:
- run
sudo sed -i 's/log\//\/var\/dionaea\/log\//g' /etc/dionaea/dionaea.conf:
cmd:
- run
sudo dionaea -c /etc/dionaea/dionaea.conf -w /var/dionaea -u nobody -g nogroup -D:
cmd:
- run
Vagrant.configure("2") do |config|
## Choose your base box
config.vm.box = "hashicorp/precise32"
## For masterless, mount your salt file root
config.vm.synced_folder "salt/roots/", "/srv/salt/"
## Use all the defaults:
config.vm.provision :salt do |kdsalt|
# salt.minion_config = "salt/minion"
#salt.run_highstate = true
end
config.vm.provision :shell, path: "bootstrap.sh"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment