diff --git a/lib/puppet/transport/cisco_ios.rb b/lib/puppet/transport/cisco_ios.rb index 05219ebd..9f15e769 100644 --- a/lib/puppet/transport/cisco_ios.rb +++ b/lib/puppet/transport/cisco_ios.rb @@ -55,7 +55,7 @@ def create_connection password: config[:password].unwrap, port: config[:port] || 22, timeout: config[:timeout] || 30, - verify_host_key => false, + verify_host_key => :never, user_known_hosts_file: known_hosts_file, append_all_supported_algorithms: true) else @@ -64,7 +64,7 @@ def create_connection password: config[:password].unwrap, port: config[:port] || 22, timeout: config[:timeout] || 30, - verify_host_key => :very, + verify_host_key => :accept_new, user_known_hosts_file: known_hosts_file, append_all_supported_algorithms: true) end diff --git a/lib/puppet_x/puppetlabs/cisco_ios/utility.rb b/lib/puppet_x/puppetlabs/cisco_ios/utility.rb index 2c7aeef4..8ab478a7 100644 --- a/lib/puppet_x/puppetlabs/cisco_ios/utility.rb +++ b/lib/puppet_x/puppetlabs/cisco_ios/utility.rb @@ -9,7 +9,11 @@ class Utility def self.load_yaml(full_path, replace_double_escapes = true) raise "File #{full_path} doesn't exist." unless File.exist?(full_path) yaml_file = File.read(full_path) - data_hash = YAML.safe_load(yaml_file, [Symbol]) + if Gem::Version.new(Psych::VERSION) >= Gem::Version.new("3.1.0.pre1") + data_hash = YAML.safe_load(yaml_file, permitted_classes: [Symbol]) + else + data_hash = YAML.safe_load(yaml_file, [Symbol]) + end data_hash = replace_double_escapes(data_hash) if replace_double_escapes data_hash end diff --git a/manifests/install/agent.pp b/manifests/install/agent.pp index dbe80ae8..2975ffe4 100644 --- a/manifests/install/agent.pp +++ b/manifests/install/agent.pp @@ -9,7 +9,7 @@ provider => 'puppet_gem', } - if versioncmp($facts['rubyversion'], '2.3.0') < 0 { + if versioncmp($facts['ruby']['version'], '2.3.0') < 0 { package { 'backport_dig': ensure => present, provider => 'puppet_gem', diff --git a/metadata.json b/metadata.json index a7aeecc9..5af8c7b4 100644 --- a/metadata.json +++ b/metadata.json @@ -36,7 +36,7 @@ "requirements": [ { "name": "puppet", - "version_requirement": ">= 6.0.0 < 7.0.0" + "version_requirement": ">= 6.0.0 < 8.0.0" } ], "tags": [