@@ -279,6 +279,16 @@ elasticsearch::template { 'templatename':
279279}
280280```
281281
282+ From version 7.8 elasticserch provides a new composable templates functionality, both legacy templates api and new composable templates api are supported using different data types.
283+
284+ #### Data types & defines
285+
286+ For legacy templates ` template ` is used.
287+
288+ For composable templates ` component_template ` and ` index_template ` are used.
289+
290+ Both types can be used at the same time
291+
282292#### Add a new template using a file
283293
284294This will install and/or replace the template in Elasticsearch:
@@ -414,6 +424,116 @@ elasticsearch::snapshot_repository { 'backups':
414424}
415425```
416426
427+ ### SLM (Snapshot Lifecycle Management)
428+
429+ By default SLM use the top-level ` elasticsearch::api_* ` settings to communicate with Elasticsearch.
430+ The following is an example of how to override these settings:
431+
432+ ``` puppet
433+ elasticsearch::slm_policy { 'policiyname':
434+ api_protocol => 'https',
435+ api_host => $::ipaddress,
436+ api_port => 9201,
437+ api_timeout => 60,
438+ api_basic_auth_username => 'admin',
439+ api_basic_auth_password => 'adminpassword',
440+ api_ca_file => '/etc/ssl/certs',
441+ api_ca_path => '/etc/pki/certs',
442+ validate_tls => false,
443+ source => 'puppet:///path/to/policy.json',
444+ }
445+ ```
446+
447+ #### Add a new SLM policy using a file
448+
449+ This will install and/or replace the SLM ploicy in Elasticsearch:
450+
451+ ``` puppet
452+ elasticsearch::slm_policy { 'policyname':
453+ source => 'puppet:///path/to/policy.json',
454+ }
455+ ```
456+
457+ #### Add a new SLM policy using content
458+ This will install and/or replace ILM policy in Elasticsearch:
459+
460+ ``` puppet
461+ elasticsearch::slm_policy { 'policyname':
462+ content => {
463+ name => '<backup-{now/d}>',
464+ schedule => '0 30 1 * * ?',
465+ repository => 'backup',
466+ config => { },
467+ retention => {
468+ expire_after => '60d',
469+ min_count => 2,
470+ max_count => 10
471+ }
472+ }
473+ }
474+ ```
475+
476+ ### ILM (Index Lifecycle Management)
477+
478+ By default ILM use the top-level ` elasticsearch::api_* ` settings to communicate with Elasticsearch.
479+ The following is an example of how to override these settings:
480+
481+ ``` puppet
482+ elasticsearch::ilm_policy { 'policiyname':
483+ api_protocol => 'https',
484+ api_host => $::ipaddress,
485+ api_port => 9201,
486+ api_timeout => 60,
487+ api_basic_auth_username => 'admin',
488+ api_basic_auth_password => 'adminpassword',
489+ api_ca_file => '/etc/ssl/certs',
490+ api_ca_path => '/etc/pki/certs',
491+ validate_tls => false,
492+ source => 'puppet:///path/to/policy.json',
493+ }
494+ ```
495+
496+ #### Add a new ILM policy using a file
497+
498+ This will install and/or replace the ILM ploicy in Elasticsearch:
499+
500+ ``` puppet
501+ elasticsearch::ilm_policy { 'policyname':
502+ source => 'puppet:///path/to/policy.json',
503+ }
504+ ```
505+
506+ #### Add a new ILM policy using content
507+ This will install and/or replace ILM policy in Elasticsearch:
508+
509+ ``` puppet
510+ elasticsearch::ilm_policy { 'policyname':
511+ content => {
512+ policy => {
513+ phases => {
514+ warm => {
515+ min_age => "7d"
516+ actions => {
517+ forcemerge => {
518+ max_num_segments => 1
519+ }
520+ }
521+ }
522+ }
523+ }
524+ }
525+ }
526+ ```
527+ #### Delete an ILM policy
528+
529+ This will install and/or replace the ILM ploicy in Elasticsearch:
530+
531+ ``` puppet
532+ elasticsearch::ilm_policy { 'policyname':
533+ ensure => 'absent',
534+ }
535+ ```
536+
417537### Connection Validator
418538
419539This module offers a way to make sure an instance has been started and is up and running before
0 commit comments