diff --git a/manifests/site.pp b/manifests/site.pp index 267ede0..18b16a6 100755 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -7,17 +7,19 @@ node "default" { - # initialize core packages - include user - include network - include puppet - include ssh - include git - include samba - include motd + # initialize core packages + include user + include network + include puppet + include ssh + include git + include samba + include motd + include unzip + + # initialize LEMP stack + include phpfpm - # initialize LEMP stack - include phpfpm phpfpm::nginx::kalabox { "default": server_name => "kala", root => "/var/www", diff --git a/modules/unzip/manifests/init.pp b/modules/unzip/manifests/init.pp new file mode 100644 index 0000000..74949bb --- /dev/null +++ b/modules/unzip/manifests/init.pp @@ -0,0 +1,9 @@ +/** + * + * Install and unzip + */ +class unzip { + + include unzip::install + +} diff --git a/modules/unzip/manifests/install.pp b/modules/unzip/manifests/install.pp new file mode 100644 index 0000000..a331786 --- /dev/null +++ b/modules/unzip/manifests/install.pp @@ -0,0 +1,11 @@ +/** + * + * Install unzip + */ +class unzip::install { + + package { "unzip": + ensure => "6.0-4ubuntu1", + } + +} diff --git a/modules/webgrind/manifests/config.pp b/modules/webgrind/manifests/config.pp index 7c2e1b5..631c917 100644 --- a/modules/webgrind/manifests/config.pp +++ b/modules/webgrind/manifests/config.pp @@ -6,11 +6,16 @@ class webgrind::config { file { "webgrind.ini": - ensure => file, - path => "/etc/php5/conf.d/webgrind.ini", - require => Class["phpfpm::extensions::xdebug"], - notify => [Class["phpfpm::service"], Class["nginx::service"]], - content => template("webgrind/webgrind.ini.erb") + ensure => file, + path => "/etc/php5/conf.d/webgrind.ini", + require => Class["phpfpm::extensions::xdebug"], + notify => [Class["phpfpm::service"], Class["nginx::service"]], + content => template("webgrind/webgrind.ini.erb") } + phpfpm::nginx::kalabox { "webgrind": + server_name => "grind.kala", + root => "/var/www/webgrind", + } + } diff --git a/modules/webgrind/manifests/install.pp b/modules/webgrind/manifests/install.pp index c0bad13..7e84a71 100644 --- a/modules/webgrind/manifests/install.pp +++ b/modules/webgrind/manifests/install.pp @@ -4,5 +4,12 @@ * */ class webgrind::install { + + exec { "install-webgrind": + path => "/bin:/usr/bin", + unless => "cat /var/www/webgrind/index.php", + command => "wget http://webgrind.googlecode.com/files/webgrind-release-1.0.zip -O /tmp/grind.zip && unzip /tmp/grind.zip -d /var/www/", + require => [Class["phpfpm::extensions::xdebug"], Class["unzip::install"]], + } }