Configurations
in your puppet folder create this filer manifests/site.ppapply your puppet and check it's working: sudo puppet apply --verbose manifests/site.pp
Exec { path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" } include apache2
create your virtual host in here: modules/apache2/files/massiveapp.conf
ServerName myapp DocumentRoot "/var/myapp/current/public/" CustomLog /var/log/apache2/myapp-access_log combined ErrorLog /var/log/apache2/myapp-error_log
In your puppet folder built this directory files: modules/apache2/manifests/init.pp
in init.pp create this config:
package { "apache2": ensure => present, before => File["/etc/apache2/apache2.conf"] } service { "apache2": ensure => true, enable => true, subscribe => File["/etc/apache2/apache2.conf"] } file { "/etc/apache2/apache2.conf": owner => root, group => root, mode => 644, source => "puppet:///modules/apache2/apache2.conf"; "/etc/apache2/sites-enabled/massiveapp.conf": source => "puppet:///modules/apache2/massiveapp.conf", owner => root, group => root, notify => Service["apache2"], require => Package["apache2"]; } file { "/etc/apache2/apache2.conf": owner => root, group => root, mode => 644, source => "puppet:///modules/apache2/apache2.conf"; "/etc/apache2/sites-enabled/massiveapp.conf": source => "puppet:///modules/apache2/massiveapp.conf", owner => root, group => root, notify => Service["apache2"], require => Package["apache2"]; }
0 comments:
Post a Comment