-
-
Notifications
You must be signed in to change notification settings - Fork 471
Open
Labels
Description
- Module version: commit 278f0c5
- Puppet version: 6.8.1
- OS and version: ubuntu 16.04
- EL 7.6.1
Bug description
I have this into my manifest
elasticsearch::script { 'my_script':
ensure => 'present',
source => 'puppet:///modules/common/elastisearch/my_script'
}
After repuppet, I have the script on many locations on one of my 4 nodes
root@thorin:/# find / -name "my_script"
./etc/elasticsearch/thorin/scripts/my_script
./etc/elasticsearch/scripts/my_script
./usr/share/elasticsearch/scripts/my_script
But I can't list those scripts ussing...
GET _cluster/state/metadata?pretty&filter_path=**.stored_scripts
I have tried to restart the node but scripts doesn't be loaded.
I'm doing something wrong?
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
icalvete commentedon Mar 20, 2020
Since file scripts are deprecated (elastic/elasticsearch#24552 & elastic/elasticsearch#24555) this aproach is not going to work anymore.
API it's the only way.
icalvete commentedon Mar 20, 2020
I'm thinking about rewrite this define using a type and provider (and default provider 'puppet/provider/elastic_rest') to call the Elasticsearch API
Some clue?
fatmcgav commentedon Mar 20, 2020
@icalvete As you've spotted, file-based scripts have now been deprecated, and replaced by Stored scripts
Adding an
elasticsearch_script
type & provider is the best approach to leveraging the new API based functionality.The API is very simple - GET, POST and DELETE.
Therefore modelling on the existing
elasticsearch_pipeline
type and provider should get things working pretty quickly.