Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up KDC database password error #23

Merged
merged 1 commit into from
Oct 2, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions manifests/kdc/master.pp
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@
include kerberos::server::kprop
}

if $kdc_database_password {
$db_password = $kdc_database_password
} else {
$db_password = fail('kdc_data_password must be set')
if ! $kdc_database_password {
fail('kdc_database_password must be set')
}

exec { 'create_krb5kdc_principal':
command => "${kdb5_util_path} -r ${realm} -P \'${db_password}\' create -s",
command => "${kdb5_util_path} -r ${realm} -P \'${kdc_database_password}\' create -s",
creates => $kdc_database_path,
require => [ File['krb5-kdc-database-dir', 'kdc.conf'], ],
}
Expand Down
8 changes: 3 additions & 5 deletions manifests/kdc/slave.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@
include kerberos::server::kprop
}

if $kdc_database_password {
$db_password = $kdc_database_password
} else {
$db_password = fail('kdc_data_password must be set')
if ! $kdc_database_password {
fail('kdc_database_password must be set')
}

# funky: Wait for someone to create our database before starting the KDC. In
Expand All @@ -46,7 +44,7 @@
try_sleep => 30,
} ->
exec { 'krb5-stash-database-pw':
command => "echo '${db_password}' | ${kdb5_util_path} stash",
command => "echo '${kdc_database_password}' | ${kdb5_util_path} stash",
path => [ '/bin', '/usr/bin', '/sbin', '/usr/sbin' ],
creates => $kdc_stash_path,
} ~>
Expand Down