OLD | NEW |
1 class rietveld( | 1 class rietveld( |
2 $domain, | 2 $domain, |
3 $certificate, | 3 $certificate, |
4 $private_key, | 4 $private_key, |
5 $is_default=false | 5 $is_default=false |
6 ) inherits private::rietveld { | 6 ) inherits private::rietveld { |
7 | 7 |
8 include nginx | 8 include nginx |
9 $django_home = '/home/rietveld/django-gae2django' | 9 $django_home = '/home/rietveld/django-gae2django' |
10 $rietveld_home = "${django_home}/examples/rietveld" | 10 $rietveld_home = "${django_home}/examples/rietveld" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 target => '/lib/init/upstart-job', | 73 target => '/lib/init/upstart-job', |
74 require => [File['/etc/init/rietveld.conf'], Exec['install_rietveld']] | 74 require => [File['/etc/init/rietveld.conf'], Exec['install_rietveld']] |
75 } | 75 } |
76 | 76 |
77 service {'rietveld': | 77 service {'rietveld': |
78 ensure => running, | 78 ensure => running, |
79 hasstatus => false, | 79 hasstatus => false, |
80 require => [Package['gunicorn'], File['/etc/init.d/rietveld']] | 80 require => [Package['gunicorn'], File['/etc/init.d/rietveld']] |
81 } | 81 } |
82 | 82 |
83 exec {'set_superuser': | |
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", | |
85 cwd => "${rietveld_home}", | |
86 require => Exec['install_rietveld'], | |
87 } | |
88 | |
89 file {"${rietveld_home}/fixtures": | 83 file {"${rietveld_home}/fixtures": |
90 ensure => directory, | 84 ensure => directory, |
91 owner => 'rietveld', | 85 owner => 'rietveld', |
92 mode => 0750, | 86 mode => 0750, |
93 require => Exec['install_rietveld'], | 87 require => Exec['install_rietveld'], |
94 } | 88 } |
95 | 89 |
96 define fixture( | 90 define fixture( |
97 $ensure = present, | 91 $ensure = present, |
98 $source = undef, | 92 $source = undef, |
(...skipping 22 matching lines...) Expand all Loading... |
121 notify => $ensure ? { | 115 notify => $ensure ? { |
122 present => Exec[$destination], | 116 present => Exec[$destination], |
123 default => [], | 117 default => [], |
124 } | 118 } |
125 } | 119 } |
126 } | 120 } |
127 | 121 |
128 $fixtures = hiera('rietveld_fixtures', {}) | 122 $fixtures = hiera('rietveld_fixtures', {}) |
129 create_resources(rietveld::fixture, $fixtures) | 123 create_resources(rietveld::fixture, $fixtures) |
130 } | 124 } |
OLD | NEW |