diff --git a/lib/puppet/provider/elasticsearch_license/xpack.rb b/lib/puppet/provider/elasticsearch_license/xpack.rb index 4bae734c5..c6c6fcfae 100644 --- a/lib/puppet/provider/elasticsearch_license/xpack.rb +++ b/lib/puppet/provider/elasticsearch_license/xpack.rb @@ -3,20 +3,19 @@ require 'puppet/provider/elastic_rest' Puppet::Type.type(:elasticsearch_license).provide( - :xpack, - api_resource_style: :bare, + :ruby, parent: Puppet::Provider::ElasticREST, metadata: :content, metadata_pipeline: [ ->(data) { Puppet_X::Elastic.deep_to_s data }, ->(data) { Puppet_X::Elastic.deep_to_i data } ], - api_uri: '_xpack/license', + api_uri: '_license', query_string: { 'acknowledge' => 'true' } ) do - desc 'A REST API based provider to manage Elasticsearch X-Pack licenses.' + desc 'A REST API based provider to manage Elasticsearch licenses.' mk_resource_methods @@ -25,7 +24,7 @@ def self.process_body(body) { :name => name.to_s, :ensure => :present, - metadata => { 'license' => process_metadata(api_object) }, + metadata => { 'licenses' => [ process_metadata(api_object) ] }, :provider => name } end