From f631a60d60398c07688489b6348f03e2f8fe1f88 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Wed, 29 May 2013 17:36:53 +0200 Subject: [PATCH] Vagrant: Add automated provisioning of Apache2 and PHP5.3 refs #4232 --- .../modules/apache/manifests/init.pp | 31 +++++++++++++++++++ .vagrant-puppet/modules/php/manifests/init.pp | 25 +++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .vagrant-puppet/modules/apache/manifests/init.pp create mode 100644 .vagrant-puppet/modules/php/manifests/init.pp diff --git a/.vagrant-puppet/modules/apache/manifests/init.pp b/.vagrant-puppet/modules/apache/manifests/init.pp new file mode 100644 index 000000000..a9ce981fd --- /dev/null +++ b/.vagrant-puppet/modules/apache/manifests/init.pp @@ -0,0 +1,31 @@ +# Class: apache +# +# This class installs the apache server. +# +# Parameters: +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +# include apache +# +class apache { + + $apache = $::operatingsystem ? { + /(Debian|Ubuntu)/ => 'apache2', + /(RedHat|CentOS|Fedora)/ => 'httpd' + } + + package { $apache: + ensure => installed, + alias => 'apache' + } + + service { $apache: + ensure => running, + require => Package['apache'] + } +} diff --git a/.vagrant-puppet/modules/php/manifests/init.pp b/.vagrant-puppet/modules/php/manifests/init.pp new file mode 100644 index 000000000..f835554c5 --- /dev/null +++ b/.vagrant-puppet/modules/php/manifests/init.pp @@ -0,0 +1,25 @@ +# Class: php +# +# This class installs the php and php-mysql packages. +# +# Parameters: +# +# Actions: +# +# Requires: +# +# Sample Usage: +# +# include php +# +class php { + + package { 'php': + ensure => installed + } + + package { 'php-mysql': + ensure => installed, + require => Package['mysql-server'] + } +}