Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: modules/rietveld/manifests/init.pp

Issue 6651739155464192: Issue 2185 - Migrate Rieveld superuser creation to fixture (Closed)
Patch Set: Created March 20, 2015, 11:33 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « modules/private-stub/hiera/roles/codereviewserver.yaml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « modules/private-stub/hiera/roles/codereviewserver.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld