mirror of https://github.com/interlegis/sigi.git
Marcio Mazza
10 years ago
5 changed files with 43 additions and 0 deletions
@ -0,0 +1,19 @@ |
|||
# -*- mode: ruby -*- |
|||
# vi: set ft=ruby : |
|||
|
|||
VAGRANTFILE_API_VERSION = "2" |
|||
|
|||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
|||
|
|||
config.vm.box = "ubuntu/trusty64" |
|||
|
|||
config.vm.network :forwarded_port, guest: 80, host: 8080 |
|||
|
|||
config.vm.provision :shell, :path => "puppet/bootstrap.sh" |
|||
|
|||
config.vm.provision :puppet do |puppet| |
|||
puppet.manifests_path = "puppet/manifests" |
|||
puppet.manifest_file = "site.pp" |
|||
end |
|||
|
|||
end |
@ -0,0 +1,17 @@ |
|||
#!/bin/bash |
|||
|
|||
puppet_nginx_instalado=$( puppet module list | grep -ic nginx ) |
|||
|
|||
if [ $puppet_nginx_instalado -eq 0 ] |
|||
then |
|||
TAR_FILE=/tmp/puppet-nginx.tar.gz |
|||
|
|||
wget https://github.com/interlegis/puppet-nginx/archive/master.tar.gz -O $TAR_FILE |
|||
rm -fr /tmp/puppet-nginx-master |
|||
tar -C /tmp -xf $TAR_FILE |
|||
|
|||
echo 'Building module puppet-nginx...' |
|||
TAR_MODULE=$(puppet module build /tmp/puppet-nginx-master | grep 'Module built' | cut -d\ -f 3) |
|||
echo 'Installing module puppet-nginx from ' $TAR_MODULE ' ...' |
|||
puppet module install $TAR_MODULE |
|||
fi |
@ -0,0 +1,5 @@ |
|||
class { 'nginx': } |
|||
|
|||
nginx::resource::vhost { 'localhost': |
|||
www_root => '/vagrant/www_temp', |
|||
} |
@ -0,0 +1 @@ |
|||
Teste |
Loading…
Reference in new issue