| OLD | NEW |
| 1 class rietveld( | 1 class rietveld( |
| 2 $domain, | 2 $domain, |
| 3 $certificate, |
| 4 $private_key, |
| 3 $is_default=false | 5 $is_default=false |
| 4 ) inherits private::rietveld { | 6 ) inherits private::rietveld { |
| 5 | 7 |
| 6 include nginx | 8 include nginx |
| 7 $django_home = '/home/rietveld/django-gae2django' | 9 $django_home = '/home/rietveld/django-gae2django' |
| 8 $rietveld_home = "${django_home}/examples/rietveld" | 10 $rietveld_home = "${django_home}/examples/rietveld" |
| 9 | 11 |
| 10 Exec { | 12 Exec { |
| 11 path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin', | 13 path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin', |
| 12 } | 14 } |
| 13 | 15 |
| 14 nginx::hostconfig {$domain: | 16 nginx::hostconfig {$domain: |
| 15 source => 'puppet:///modules/rietveld/site.conf', | 17 source => 'puppet:///modules/rietveld/site.conf', |
| 16 is_default => $is_default, | 18 is_default => $is_default, |
| 17 certificate => 'adblockplus.org_sslcert.pem', | 19 certificate => $certificate, |
| 18 private_key => 'adblockplus.org_sslcert.key', | 20 private_key => $private_key, |
| 19 log => 'access_log_codereview' | 21 log => 'access_log_codereview' |
| 20 } | 22 } |
| 21 | 23 |
| 22 package {['python-django', 'make', 'patch', 'gunicorn']: ensure => present} | 24 package {['python-django', 'make', 'patch', 'gunicorn']: ensure => present} |
| 23 | 25 |
| 24 user {'rietveld': | 26 user {'rietveld': |
| 25 ensure => present, | 27 ensure => present, |
| 26 comment => 'User of the rietveld installation', | 28 comment => 'User of the rietveld installation', |
| 27 home => '/home/rietveld', | 29 home => '/home/rietveld', |
| 28 managehome => true | 30 managehome => true |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 hasstatus => false, | 79 hasstatus => false, |
| 78 require => [Package['gunicorn'], File['/etc/init.d/rietveld']] | 80 require => [Package['gunicorn'], File['/etc/init.d/rietveld']] |
| 79 } | 81 } |
| 80 | 82 |
| 81 exec {'set_superuser': | 83 exec {'set_superuser': |
| 82 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", | 84 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", |
| 83 cwd => "${rietveld_home}", | 85 cwd => "${rietveld_home}", |
| 84 require => Exec['install_rietveld'], | 86 require => Exec['install_rietveld'], |
| 85 } | 87 } |
| 86 } | 88 } |
| OLD | NEW |