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