Skip to content


Repository files navigation


Puppet Forge Puppet Forge downloads Puppet Forge score test

This module installs, configures, and manages curator, an elastic product that allows management of an elasticsearch cluster indices.

It has been inspired of the jlambert121-curator module but designed to support curator > 4.x


This is a example usage of how you can use this module

Include the main class

include ::curator

Define an action

curator::action { 'purge_logstash_over_45_days':
  entities => {
    1 => {
      'action' => 'delete_indices',
      'description' => 'Delete indices older than 45 days (based on index name)',
      'options' => {
        'continue_if_exception' => 'True',
        'disable_action'        => 'False',
        'ignore_empty_list'     => 'True',
      'filters' => [
          'filtertype' => 'pattern',
          'kind'       => 'prefix',
          'value'      => 'logstash-',
          'filtertype' => 'age',
          'source'     => 'name',
          'direction'  => 'older',
          'timestring' => '%Y.%m.%d',
          'unit'       => 'days',
          'unit_count' => '45',

Define a job that automates the trigger of the action

curator::job { 'purge_logstash_over_45_days_everyday':
  action => 'purge_logstash_over_45_days',
  minute => 0,
  hour   => 2,

Builtin Hiera support

You can also directly use hiera in order to manage your resources :

  • Include those additionnal classes in Puppet
include ::curator::actions
include ::curator::jobs
  • And then in Hiera :
        action: delete_indices
        description: Delete indices older than 45 days (based on index name)
          continue_if_exception: 'True'
          disable_action: 'False'
          ignore_empty_list: 'True'
          - filtertype: pattern
            kind: prefix
            value: logstash-
          - filtertype: age
            source: name
            direction: older
            timestring: '%Y.%m.%d'
            unit: days
            unit_count: '45'

    action: 'purge_logstash_over_45_days'
    minute: 0
    hour: 2


This module has been built on and tested from Puppet 4.3 up to 7.14.

The module has been tested on:

  • Debian 7 -> 11
  • RHEL/CentOS 6/7
  • Ubuntu 14 -> 20

Testing on other platforms has been light and cannot be guaranteed.


Please report bugs and feature request using GitHub issue tracker.

For pull requests, it is very much appreciated to check your Puppet manifest with puppet-lint to follow the recommended Puppet style guidelines from the Puppet Labs style guide.