Skip to content

Commit

Permalink
Updated actions and jobs definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
mvisonneau committed Jan 24, 2017
1 parent 04ec3d4 commit 1624434
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 21 deletions.
52 changes: 32 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,29 +72,41 @@ curator::job { 'purge_logstash_over_45_days_everyday':

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

- Include those additionnal classes in Puppet

```puppet
include ::curator::actions
include ::curator::jobs
```

- And then in Hiera :

```yaml

curator::actions:
curator::actions::values:
'purge_logstash_over_45_days':
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'

curator::jobs:
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'

curator::jobs::values:
'purge_logstash_over_45_days_everyday':
action: 'purge_logstash_over_45_days'
minute: '0'
Expand Down
14 changes: 14 additions & 0 deletions manifests/actions.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# == Class: curator::actions
#
# Creates action resources from a given hash
#
# === Parameters
#
class curator::actions (
Hash $values = {},
) {
require curator
require curator::config

create_resources( curator::action, $values )
}
14 changes: 14 additions & 0 deletions manifests/jobs.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# == Class: curator::jobs
#
# Creates job resources from a given hash
#
# === Parameters
#
class curator::jobs (
Hash $values = {},
) {
require curator
require curator::config

create_resources( curator::job, $values )
}
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mvisonneau-curator",
"version": "1.0.1",
"version": "1.0.2",
"author": "Maxime VISONNEAU",
"summary": "Installs, configures, and manages Elasticsearch Curator.",
"license": "Apache-2.0",
Expand Down

0 comments on commit 1624434

Please sign in to comment.