Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
puppetpublic
base
Commits
4f3c649d
Commit
4f3c649d
authored
8 years ago
by
Karl Kornel
Browse files
Options
Downloads
Patches
Plain Diff
wallet: Test for running in a builder environment
parent
74b07b83
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
manifests/wallet.pp
+32
-20
32 additions, 20 deletions
manifests/wallet.pp
with
32 additions
and
20 deletions
manifests/wallet.pp
+
32
−
20
View file @
4f3c649d
...
@@ -31,6 +31,15 @@
...
@@ -31,6 +31,15 @@
# path => '/etc/foobar/password',
# path => '/etc/foobar/password',
# type => 'file',
# 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
# These helper routines are broken out separately to reduce indentation, but
# shouldn't be called separately. They're purely an implementation detail.
# shouldn't be called separately. They're purely an implementation detail.
...
@@ -46,6 +55,7 @@ define base::wallet(
...
@@ -46,6 +55,7 @@ define base::wallet(
$type
=
'keytab'
,
$type
=
'keytab'
,
$onlyif
=
'NONE'
,
$onlyif
=
'NONE'
,
$heimdal
=
false
,
$heimdal
=
false
,
$build_ok
=
false
,
$path
$path
)
{
)
{
case
$auth_principal
{
case
$auth_principal
{
...
@@ -62,27 +72,29 @@ define base::wallet(
...
@@ -62,27 +72,29 @@ define base::wallet(
file
{
$path
:
ensure
=>
absent
}
file
{
$path
:
ensure
=>
absent
}
}
}
'present'
:
{
'present'
:
{
case
$type
{
if
(
$build_ok
or
!
$::packer_build_name
)
{
'keytab'
:
{
case
$type
{
base::wallet::keytab
{
$name
:
'keytab'
:
{
kstart_cmd
=>
$kstart_cmd
,
base::wallet::keytab
{
$name
:
path
=>
$path
,
kstart_cmd
=>
$kstart_cmd
,
primary
=>
$primary
,
path
=>
$path
,
mode
=>
$mode
,
primary
=>
$primary
,
owner
=>
$owner
,
mode
=>
$mode
,
group
=>
$group
,
owner
=>
$owner
,
heimdal
=>
$heimdal
,
group
=>
$group
,
heimdal
=>
$heimdal
,
}
}
}
}
default
:
{
default
:
{
base::wallet::other
{
$name
:
base::wallet::other
{
$name
:
kstart_cmd
=>
$kstart_cmd
,
kstart_cmd
=>
$kstart_cmd
,
path
=>
$path
,
path
=>
$
path
,
type
=>
$
type
,
typ
e
=>
$
typ
e
,
mod
e
=>
$
mod
e
,
mode
=>
$
mode
,
owner
=>
$
owner
,
owner
=>
$
owner
,
group
=>
$
group
,
group
=>
$
group
,
onlyif
=>
$
onlyif
,
onlyif
=>
$onlyif
,
}
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment