diff options
author | mh <mh@immerda.ch> | 2013-12-04 22:54:44 +0100 |
---|---|---|
committer | mh <mh@immerda.ch> | 2013-12-04 22:54:44 +0100 |
commit | 6578e0c9188fd41a9c9e066dbd984b79bb8961a3 (patch) | |
tree | 7d53160b49d0a855e07e1ed9e0a2b66dd6353ad9 /lib/puppet/parser/functions | |
parent | 19218d6b02126ee5b772dc50428ebb6cedf12d80 (diff) | |
download | puppet-sshd-6578e0c9188fd41a9c9e066dbd984b79bb8961a3.tar.gz puppet-sshd-6578e0c9188fd41a9c9e066dbd984b79bb8961a3.tar.bz2 |
fix deprecation warning 'Puppet::Util.execute is deprecated; please use Puppet::Util::Execution.execute'
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r-- | lib/puppet/parser/functions/ssh_keygen.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/ssh_keygen.rb b/lib/puppet/parser/functions/ssh_keygen.rb index 597315e..d411a28 100644 --- a/lib/puppet/parser/functions/ssh_keygen.rb +++ b/lib/puppet/parser/functions/ssh_keygen.rb @@ -19,7 +19,9 @@ Puppet::Parser::Functions::newfunction(:ssh_keygen, :type => :rvalue, :doc => FileUtils.mkdir_p(dir, :mode => 0700) end unless [private_key_path,public_key_path].all?{|path| File.exists?(path) } - output = Puppet::Util.execute(['/usr/bin/ssh-keygen','-t', 'rsa', '-b', '4096', '-f', private_key_path, '-P', '', '-q']) + output = Puppet::Util::Execution.execute( + ['/usr/bin/ssh-keygen','-t', 'rsa', '-b', '4096', + '-f', private_key_path, '-P', '\'\'', '-q']) raise Puppet::ParseError, "Something went wrong during key generation! Output: #{output}" unless output.empty? end [File.read(private_key_path),File.read(public_key_path)] |