Skip to content
Snippets Groups Projects
Commit 4f3c649d authored by Karl Kornel's avatar Karl Kornel
Browse files

wallet: Test for running in a builder environment

parent 74b07b83
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,15 @@
# path => '/etc/foobar/password',
# type => 'file',
# }
#
# It is important to note that, by default, this code will use the host's
# keytab (located at /etc/krb5.keytab), so you will need to have that in
# place before your Puppet code runs. Or, you can pass a keytab file path
# using the $auth_keytab variable.
#
# Also, if base::wallet detects that it is being run under Packer, then
# it will not do anything. If you want it to run under Packer, then set
# $build_ok to true, and also set $auth_keytab appropriately.
# These helper routines are broken out separately to reduce indentation, but
# shouldn't be called separately. They're purely an implementation detail.
......@@ -46,6 +55,7 @@ define base::wallet(
$type = 'keytab',
$onlyif = 'NONE',
$heimdal = false,
$build_ok = false,
$path
) {
case $auth_principal {
......@@ -62,27 +72,29 @@ define base::wallet(
file { $path: ensure => absent }
}
'present': {
case $type {
'keytab': {
base::wallet::keytab { $name:
kstart_cmd => $kstart_cmd,
path => $path,
primary => $primary,
mode => $mode,
owner => $owner,
group => $group,
heimdal => $heimdal,
if ($build_ok or !$::packer_build_name) {
case $type {
'keytab': {
base::wallet::keytab { $name:
kstart_cmd => $kstart_cmd,
path => $path,
primary => $primary,
mode => $mode,
owner => $owner,
group => $group,
heimdal => $heimdal,
}
}
}
default: {
base::wallet::other { $name:
kstart_cmd => $kstart_cmd,
path => $path,
type => $type,
mode => $mode,
owner => $owner,
group => $group,
onlyif => $onlyif,
default: {
base::wallet::other { $name:
kstart_cmd => $kstart_cmd,
path => $path,
type => $type,
mode => $mode,
owner => $owner,
group => $group,
onlyif => $onlyif,
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment