Created
February 26, 2015 00:49
-
-
Save jsrn/dfd1807dc270a8b2dab4 to your computer and use it in GitHub Desktop.
Deploying Dionaea with Vagrant and Salt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "192.168.1.64 salt" >> "/etc/hosts" | |
sudo salt-minion -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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