Skip to content

Commit

Permalink
Switch to Hiera-based parameter data
Browse files Browse the repository at this point in the history
  • Loading branch information
towo committed Dec 30, 2020
1 parent ccbc0ec commit b3236f5
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
8 changes: 8 additions & 0 deletions hiera.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
version: 5
defaults:
datadir: 'data'
data_hash: yaml_data
hierarchy:
- name: 'Defaults'
path: 'defaults.yaml'
35 changes: 17 additions & 18 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,23 @@
# so the dynamic user is not present and the local user can be added.
#
class earlyoom (
String[1] $pkgname = 'earlyoom',
Stdlib::Unixpath $configfile = '/etc/default/earlyoom',
Integer[0] $interval = 60,
Boolean $service_enable = true,
Boolean $ignore_positive = false,
Boolean $notify_send = false,
Boolean $debug = false,
Boolean $priority = false,
Boolean $dryrun = false,
Boolean $local_user = false,
Optional[String[1]] $prefer = undef,
Optional[String[1]] $avoid = undef,
Optional[String[1]] $notify_command = undef,
Optional[Variant[Integer[0,100],Array[Integer[0,100],2,2]]] $memory_percent = undef,
Optional[Variant[Integer[0,100],Array[Integer[0,100],2,2]]] $swap_percent = undef,
Optional[Variant[Integer[0],Array[Integer[0],2,2]]] $memory_size = undef,
Optional[Variant[Integer[0],Array[Integer[0],2,2]]] $swap_size = undef,

String[1] $pkgname,
Stdlib::Unixpath $configfile,
Integer[0] $interval,
Boolean $service_enable,
Boolean $ignore_positive,
Boolean $notify_send,
Boolean $debug,
Boolean $priority,
Boolean $dryrun,
Boolean $local_user,
Optional[String[1]] $prefer,
Optional[String[1]] $avoid,
Optional[String[1]] $notify_command,
Optional[Variant[Integer[0,100],Array[Integer[0,100],2,2]]] $memory_percent,
Optional[Variant[Integer[0,100],Array[Integer[0,100],2,2]]] $swap_percent,
Optional[Variant[Integer[0],Array[Integer[0],2,2]]] $memory_size,
Optional[Variant[Integer[0],Array[Integer[0],2,2]]] $swap_size,
) {
contain 'earlyoom::install'
contain 'earlyoom::config'
Expand Down

0 comments on commit b3236f5

Please sign in to comment.