Permalink
Browse files

PHP module uses tap defined type

  • Loading branch information...
1 parent 7ae45b8 commit 02d176c542dddeb1a7474eb4a183bb550a4f60e3 @boztek committed Mar 8, 2013
Showing with 53 additions and 17 deletions.
  1. +27 −17 manifests/init.pp
  2. +26 −0 templates/dev.php53.plist.erb
View
@@ -1,22 +1,32 @@
class php {
- require homebrew
- exec { 'brew tap josegonzalez/php':
- creates => "${homebrew::config::tapsdir}/josegonzalez-php",
- before => Package['php53'],
- }
- exec { 'brew tap homebrew/dupes':
- creates => "${homebrew::config::tapsdir}/homebrew-dupes",
- before => Package['zlib'],
- }
+ pnx::homebrew::tap { 'homebrew/dupes': }
+ package { 'zlib':
+ require => Pnx::Homebrew::Tap['homebrew/dupes'],
+ }
- package { 'zlib': }
+ pnx::homebrew::tap { 'josegonzalez/php': }
- package { 'php53':
- require => Package['zlib'],
- install_options => [
- '--with-fpm',
- '--with-gmp',
- ],
- }
+ package { 'php53':
+ ensure => present,
+ require => [
+ Pnx::Homebrew::Tap['josegonzalez/php'],
+ Package['zlib'],
+ ],
+ install_options => [
+ '--with-fpm',
+ '--with-gmp',
+ ],
+ }
+
+ file { '/Library/LaunchDaemons/dev.php53.plist':
+ content => template('php/dev.php53.plist.erb'),
+ group => 'wheel',
+ notify => Service['dev.php53'],
+ owner => 'root'
+ }
+
+ service { 'dev.php53':
+ ensure => running,
+ }
}
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>KeepAlive</key>
+ <true/>
+ <key>Label</key>
+ <string>dev.php53</string>
+ <key>ProgramArguments</key>
+ <array>
+ <string><%= scope.lookupvar "boxen::config::homebrewdir" %>/Cellar/php53/5.3.21/sbin/php-fpm</string>
+ <string>--fpm-config</string>
+ <string><%= scope.lookupvar "boxen::config::homebrewdir" %>/etc/php/5.3/php-fpm.conf</string>
+ </array>
+ <key>RunAtLoad</key>
+ <true/>
+ <key>LaunchOnlyOnce</key>
+ <true/>
+ <key>UserName</key>
+ <string>boris</string>
+ <key>WorkingDirectory</key>
+ <string><%= scope.lookupvar "boxen::config::homebrewdir" %>/var</string>
+ <key>StandardErrorPath</key>
+ <string><%= scope.lookupvar "boxen::config::homebrewdir" %>/Cellar/php53/5.3.21/var/log/php-fpm.log</string>
+</dict>
+</plist>

0 comments on commit 02d176c

Please sign in to comment.