Skip to content

Commit 0390edc

Browse files
authored
Merge pull request #1196 from voxpupuli/puppet8_20230723
Add Puppet 8 support
2 parents 299c4fc + 3e6af08 commit 0390edc

12 files changed

+37
-37
lines changed

lib/puppet/provider/elastic_rest.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def self.api_objects(protocol = 'http',
9292
password = nil,
9393
ca_file = nil,
9494
ca_path = nil,
95-
validate_tls: true)
95+
validate_tls = true)
9696

9797
uri = URI("#{protocol}://#{host}:#{port}/#{format_uri(api_discovery_uri)}")
9898
http = Net::HTTP.new uri.host, uri.port
@@ -158,7 +158,7 @@ def self.prefetch(resources)
158158
(p.key?(:password) ? p[:password].value : nil),
159159
(p.key?(:ca_file) ? p[:ca_file].value : nil),
160160
(p.key?(:ca_path) ? p[:ca_path].value : nil),
161-
{ validate_tls: p[:validate_tls].value },
161+
(p.key?(:validate_tls) ? p[:validate_tls].value : true),
162162
]
163163
# Deduplicate identical settings, and fetch templates
164164
end.uniq
@@ -264,7 +264,7 @@ def flush
264264
resource[:password],
265265
resource[:ca_file],
266266
resource[:ca_path],
267-
validate_tls: resource[:validate_tls]
267+
resource[:validate_tls].nil? ? true : resource[:validate_tls]
268268
).find do |t|
269269
t[:name] == resource[:name]
270270
end

lib/puppet/type/elasticsearch_component_template.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def insync?(value)
102102

103103
fail(format('Could not find any content at %s', self[:source])) unless tmp
104104

105-
self[:content] = PSON.load(tmp.content)
105+
self[:content] = JSON.parse(tmp.content)
106106
end
107107
end
108108
# rubocop:enable Style/SignalException

lib/puppet/type/elasticsearch_ilm_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def insync?(value)
7878

7979
fail(format('Could not find any content at %s', self[:source])) unless tmp
8080

81-
self[:content] = PSON.load(tmp.content)
81+
self[:content] = JSON.parse(tmp.content)
8282
end
8383
end
8484
# rubocop:enable Style/SignalException

lib/puppet/type/elasticsearch_index_template.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def insync?(value)
109109

110110
fail(format('Could not find any content at %s', self[:source])) unless tmp
111111

112-
self[:content] = PSON.load(tmp.content)
112+
self[:content] = JSON.parse(tmp.content)
113113
end
114114
end
115115
# rubocop:enable Style/SignalException

lib/puppet/type/elasticsearch_slm_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def insync?(value)
7878

7979
fail(format('Could not find any content at %s', self[:source])) unless tmp
8080

81-
self[:content] = PSON.load(tmp.content)
81+
self[:content] = JSON.parse(tmp.content)
8282
end
8383
end
8484
# rubocop:enable Style/SignalException

lib/puppet/type/elasticsearch_template.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def insync?(value)
110110

111111
fail(format('Could not find any content at %s', self[:source])) unless tmp
112112

113-
self[:content] = PSON.load(tmp.content)
113+
self[:content] = JSON.parse(tmp.content)
114114
end
115115
end
116116
# rubocop:enable Style/SignalException

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"requirements": [
7979
{
8080
"name": "puppet",
81-
"version_requirement": ">= 7.0.0 < 8.0.0"
81+
"version_requirement": ">= 7.0.0 < 9.0.0"
8282
}
8383
]
8484
}

spec/helpers/acceptance/tests/package_url_shared_examples.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
<<-MANIFEST
1111
api_timeout => 60,
1212
config => {
13-
'cluster.name' => '#{v[:cluster_name]}',
14-
'http.bind_host' => '0.0.0.0',
1513
#{es_config.map { |k, v| " '#{k}' => '#{v}'," }.join("\n")}
1614
},
1715
jvm_options => [

spec/helpers/acceptance/tests/slm_policy_shared_examples.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@
9999
<<-MANIFEST
100100
api_timeout => 60,
101101
config => {
102-
'cluster.name' => '#{v[:cluster_name]}',
103-
'http.bind_host' => '0.0.0.0',
104102
#{es_config.map { |k, v| " '#{k}' => '#{v}'," }.join("\n")}
105103
},
106104
jvm_options => [

spec/helpers/acceptance/tests/snapshot_repository_shared_examples.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
<<-MANIFEST
3030
api_timeout => 60,
3131
config => {
32-
'cluster.name' => '#{v[:cluster_name]}',
33-
'http.bind_host' => '0.0.0.0',
3432
#{es_config.map { |k, v| " '#{k}' => '#{v}'," }.join("\n")}
3533
},
3634
jvm_options => [

0 commit comments

Comments
 (0)