]> khamidou — GitHub mirrors - kite.git/commitdiff
refactored puppet
authorkarim hamidou <khamidou@gmail.com>
Tue, 24 Dec 2013 13:10:28 +0000 (14:10 +0100)
committerkarim hamidou <khamidou@gmail.com>
Tue, 24 Dec 2013 13:10:28 +0000 (14:10 +0100)
Vagrantfile
manifests/default.pp
manifests/server.pp [new file with mode: 0644]
manifests/vagrant.pp [new file with mode: 0644]

index 32a5748783b4a0841eb9f5d946f0a4c6ba32ed8a..b50487fdcfa79526d4b4434194af2513b41de813 100644 (file)
@@ -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"
index 7725e34fab9a92ddafef17c64261c84869aedc72..a59384d2702d13152dcb77863669ee0c8f99712e 100644 (file)
@@ -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 (file)
index 0000000..2a18b81
--- /dev/null
@@ -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 (file)
index 0000000..95618d2
--- /dev/null
@@ -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',
+}