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