diff options
author | Antoine Beaupré <anarcat+gitlab@anarc.at> | 2015-04-17 18:43:16 +0000 |
---|---|---|
committer | Antoine Beaupré <anarcat+gitlab@anarc.at> | 2015-04-17 18:43:16 +0000 |
commit | d4923b2c3ad74d813a9a2e5b39b6fa171ee95bc0 (patch) | |
tree | d5827edd094604c5b73630fc0be7a5dd3bd7a833 /lib | |
parent | 953ad0f7773da4ba90df9e049eaa6e61cdcaaffe (diff) | |
parent | 5c9ce49321f4ea5d502eca98d9e9a23bae57b1da (diff) | |
download | puppet-sshd-d4923b2c3ad74d813a9a2e5b39b6fa171ee95bc0.tar.gz puppet-sshd-d4923b2c3ad74d813a9a2e5b39b6fa171ee95bc0.tar.bz2 |
Merge branch 'hostkey_type' into 'master'
Hostkey type
This is the pull request associated with: https://labs.riseup.net/code/issues/8285
See merge request !6
Diffstat (limited to 'lib')
-rw-r--r-- | lib/facter/ssh_version.rb | 5 | ||||
-rw-r--r-- | lib/puppet/parser/functions/ssh_keygen.rb | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/facter/ssh_version.rb b/lib/facter/ssh_version.rb new file mode 100644 index 0000000..51d8a00 --- /dev/null +++ b/lib/facter/ssh_version.rb @@ -0,0 +1,5 @@ +Facter.add("ssh_version") do + setcode do + ssh_version = Facter::Util::Resolution.exec('ssh -V 2>&1 1>/dev/null').chomp.split(' ')[0].split('_')[1] + end +end diff --git a/lib/puppet/parser/functions/ssh_keygen.rb b/lib/puppet/parser/functions/ssh_keygen.rb index 87a3452..e304f24 100644 --- a/lib/puppet/parser/functions/ssh_keygen.rb +++ b/lib/puppet/parser/functions/ssh_keygen.rb @@ -27,3 +27,4 @@ Puppet::Parser::Functions::newfunction(:ssh_keygen, :type => :rvalue, :doc => end [File.read(private_key_path),File.read(public_key_path)] end + |