Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CHEF
cookbooks
sys
Commits
52c2a955
Commit
52c2a955
authored
May 28, 2021
by
Christopher Huhn
Browse files
Use cat instead of mv to copy the keytab to the destination
parent
04e2101b
Changes
2
Hide whitespace changes
Inline
Side-by-side
metadata.rb
View file @
52c2a955
...
...
@@ -16,4 +16,4 @@ supports 'debian'
depends
'line'
,
'< 1.0'
depends
'chef-vault'
version
'1.60.
0
'
version
'1.60.
1
'
providers/wallet.rb
View file @
52c2a955
...
...
@@ -38,15 +38,14 @@ action :deploy do
kinit -t /etc/krb5.keytab host/
#{
node
[
'fqdn'
]
}
wallet get keytab \
#{
new_resource
.
principal
}
@
#{
node
[
'sys'
][
'krb5'
][
'realm'
].
upcase
}
\
"
#{
new_resource
.
principal
}
@
#{
node
[
'sys'
][
'krb5'
][
'realm'
].
upcase
}
"
\
-f "$TMPFILE"
ret=$?
if [ $ret = 0 ]; then
mv "$TMPFILE"
#{
new_resource
.
place
}
else
rm "$TMPFILE"
exit $ret
# in contrast to mv cat follows symlinks:
cat "$TMPFILE" > "
#{
new_resource
.
place
}
"
fi
rm "$TMPFILE"
kdestroy
EOH
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment