Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
## modules/php/manifests/init.pp class php { include apache # default php packages $packagelist = ["php5", "php5-common", "php5-cli", "libapache2-mod-php5", "php5-pgsql", "php5-mysql", "php5-curl", "php5-suhosin", "php5-snmp", "php5-xsl"] package { $packagelist: ensure => "installed", } # ensure mode enabled apache::module { "php5": } # fix pg/curl init bug file { "/etc/php5/conf.d/10-pgsql.ini": ensure => "present", content => "extension=pgsql.so", notify => Exec["apache-force-reload"], require => Package["php5-pgsql"], } file { "/etc/php5/conf.d/pgsql.ini": ensure => "absent", notify => Exec["apache-force-reload"], require => Package["php5"], } } ... define php::config ( $path = "/etc/php5/apache/php.ini", $max_execution_time = "30", $max_input_time = "60", $memory_limit = "40M", $display_errors = "Off", $post_max_size = "8M", $upload_max_filesize = "4M", ) { file { "/etc/php5/apache/php.ini": ensure => "present", content => template("php/php.ini.erb"), require => Package["php5"], } } ## modules/php/templates/php.ini.erb ; PUPPET [PHP] ... memory_limit = <%= $memory_limit %> ... ## node node "www.example.com" { include php php::config { $fqdn: memory_limit => "100M", } php::config { $fqdn: path => "/etc/php5/cli/php.ini", memory_limit => "200M", } }
This paste will be private.
From the Design Piracy series on my blog: