Load storyboard superusers from yaml file
There are actions, such as deleting projects, that should only be done by superusers. For that to work, we need to have superusers. Change-Id: I827446788ca53018a6d2c76eaf667b6fe4065f80
This commit is contained in:
parent
0979b55450
commit
84d7f9c6d7
@ -20,6 +20,7 @@ class storyboard (
|
||||
$mysql_password,
|
||||
$mysql_user,
|
||||
$projects_file,
|
||||
$superusers_file,
|
||||
$ssl_cert_file,
|
||||
$ssl_key_file,
|
||||
$ssl_chain_file,
|
||||
@ -100,6 +101,18 @@ class storyboard (
|
||||
],
|
||||
}
|
||||
|
||||
file { '/etc/storyboard/superusers.yaml':
|
||||
ensure => present,
|
||||
owner => 'storyboard',
|
||||
mode => '0400',
|
||||
source => $superusers_file,
|
||||
replace => true,
|
||||
require => [
|
||||
File['/etc/storyboard'],
|
||||
User['storyboard'],
|
||||
],
|
||||
}
|
||||
|
||||
exec { 'migrate-storyboard-db':
|
||||
command => 'storyboard-db-manage --config-file /etc/storyboard/storyboard.conf upgrade head',
|
||||
path => '/usr/local/bin:/usr/bin:/bin/',
|
||||
@ -121,6 +134,17 @@ class storyboard (
|
||||
],
|
||||
}
|
||||
|
||||
exec { 'load-superusers-yaml':
|
||||
command => 'storyboard-db-manage --config-file /etc/storyboard/storyboard.conf load_superusers /etc/storyboard/superusers.yaml',
|
||||
path => '/usr/local/bin:/usr/bin:/bin/',
|
||||
refreshonly => true,
|
||||
subscribe => File['/etc/storyboard/superusers.yaml'],
|
||||
require => [
|
||||
File['/etc/storyboard/superusers.yaml'],
|
||||
Exec['migrate-storyboard-db'],
|
||||
],
|
||||
}
|
||||
|
||||
file { '/var/log/storyboard':
|
||||
ensure => directory,
|
||||
owner => 'storyboard',
|
||||
|
Loading…
x
Reference in New Issue
Block a user