Index: modules/rietveld/manifests/init.pp |
=================================================================== |
--- a/modules/rietveld/manifests/init.pp |
+++ b/modules/rietveld/manifests/init.pp |
@@ -1,21 +1,27 @@ |
-class rietveld($domain) inherits private::rietveld { |
+class rietveld( |
+ $domain, |
+ $is_default=false |
+ ) inherits private::rietveld { |
include nginx |
$django_home = '/home/rietveld/django-gae2django' |
$rietveld_home = "${django_home}/examples/rietveld" |
Exec { |
path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin', |
} |
nginx::hostconfig {$domain: |
- content => template('rietveld/site.erb'), |
- enabled => true |
+ source => 'puppet:///modules/rietveld/site.conf', |
+ is_default => $is_default, |
+ certificate => 'adblockplus.org_sslcert.pem', |
+ private_key => 'adblockplus.org_sslcert.key', |
+ log => 'access_log_codereview' |
} |
package {['python-django', 'make', 'patch', 'gunicorn']: ensure => present} |
user {'rietveld': |
ensure => present, |
comment => 'User of the rietveld installation', |
home => '/home/rietveld', |
@@ -72,9 +78,9 @@ class rietveld($domain) inherits private |
require => [Package['gunicorn'], File['/etc/init.d/rietveld']] |
} |
exec {'set_superuser': |
command => "echo \"from django.db import DEFAULT_DB_ALIAS as database; from django.contrib.auth.models import User; User.objects.db_manager(database).create_superuser('admin', 'admins@adblockplus.org', '${admin_password}')\" | ./manage.py shell", |
cwd => "${rietveld_home}", |
require => Exec['install_rietveld'], |
} |
-} |
+} |