From: karim hamidou Date: Tue, 24 Dec 2013 13:10:28 +0000 (+0100) Subject: refactored puppet X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=34627bf54087691b0e88e3a018054c2396538034;p=kite.git refactored puppet --- diff --git a/Vagrantfile b/Vagrantfile index 32a5748..b50487f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -3,6 +3,7 @@ Vagrant.configure("2") do |config| config.vm.box_url = "http://files.vagrantup.com/precise32.box" config.vm.provision :puppet do |puppet| puppet.module_path = "puppet_modules" + puppet.manifest = "vagrant.pp" #puppet.options = "--debug --verbose" end config.vm.host_name = "example.com" diff --git a/manifests/default.pp b/manifests/default.pp index 7725e34..a59384d 100644 --- a/manifests/default.pp +++ b/manifests/default.pp @@ -61,10 +61,6 @@ class {'hostname': fqdn => $server_name } -host {'kitebox.dev': - ip => '127.0.0.1' -} - file { "/var/kitemail": require => User["kite"], ensure => "directory", @@ -97,14 +93,3 @@ class {'supervisord': appdir => "/home/kite/app/back/kite/", require => File["/home/kite/app"] } - -# deploy files -if $is_virtual == 'true' { - file {'/home/kite/app': - ensure => 'link', - target => '/vagrant/src', - owner => 'kite', - } - - # FIXME: copy/deploy files correctly if not running in vagrant -} diff --git a/manifests/server.pp b/manifests/server.pp new file mode 100644 index 0000000..2a18b81 --- /dev/null +++ b/manifests/server.pp @@ -0,0 +1,5 @@ +# Puppet manifest for setting up kite on a server + +import "settings.pp" +import "default.pp" +import "puppetlabs/vcsrepo" diff --git a/manifests/vagrant.pp b/manifests/vagrant.pp new file mode 100644 index 0000000..95618d2 --- /dev/null +++ b/manifests/vagrant.pp @@ -0,0 +1,13 @@ +# Puppet manifest for setting up kite on vagrant + +import "default.pp" + +host {'kitebox.dev': + ip => '127.0.0.1' +} + +file {'/home/kite/app': + ensure => 'link', + target => '/vagrant/src', + owner => 'kite', +}