LEFT | RIGHT |
1 class rietveld($domain) inherits private::rietveld { | 1 class rietveld($domain) inherits private::rietveld { |
2 | 2 |
3 include nginx | 3 include nginx |
4 $django_home = '/home/rietveld/django-gae2django' | 4 $django_home = '/home/rietveld/django-gae2django' |
5 $rietveld_home = "${django_home}/examples/rietveld" | 5 $rietveld_home = "${django_home}/examples/rietveld" |
6 | 6 |
7 Exec { | 7 Exec { |
8 path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin', | 8 path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin', |
9 } | 9 } |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 onlyif => "test ! -f ${$rietveld_home}/dev.db", | 53 onlyif => "test ! -f ${$rietveld_home}/dev.db", |
54 } | 54 } |
55 | 55 |
56 file {'/etc/init/rietveld.conf': | 56 file {'/etc/init/rietveld.conf': |
57 ensure => file, | 57 ensure => file, |
58 owner => root, | 58 owner => root, |
59 source => 'puppet:///modules/rietveld/rietveld.conf', | 59 source => 'puppet:///modules/rietveld/rietveld.conf', |
60 notify => Service['rietveld'], | 60 notify => Service['rietveld'], |
61 } | 61 } |
62 | 62 |
63 #work around puppets limitation towards upstart | |
64 file {'/etc/init.d/rietveld': | 63 file {'/etc/init.d/rietveld': |
65 ensure => link, | 64 ensure => link, |
66 target => '/lib/init/upstart-job', | 65 target => '/lib/init/upstart-job', |
67 require => File['/etc/init/rietveld.conf'] | 66 require => [File['/etc/init/rietveld.conf'], Exec['install_rietveld']] |
68 } | 67 } |
69 | 68 |
70 service {'rietveld': | 69 service {'rietveld': |
71 ensure => running, | 70 ensure => running, |
72 hasstatus => false, | 71 hasstatus => false, |
73 require => [Package['gunicorn'], File['/etc/init.d/rietveld'], Exec['install
_rietveld']] | 72 require => [Package['gunicorn'], File['/etc/init.d/rietveld']] |
74 } | 73 } |
75 | 74 |
76 exec {'set_superuser': | 75 exec {'set_superuser': |
77 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", | 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", |
78 cwd => "${rietveld_home}", | 77 cwd => "${rietveld_home}", |
79 require => Exec['install_rietveld'], | 78 require => Exec['install_rietveld'], |
80 } | 79 } |
81 } | 80 } |
LEFT | RIGHT |