Puppet Class: elasticsearch::example42
- Defined in:
- manifests/example42.pp
Overview
Class: elasticsearch::example42
This iclass contains Example42 extensions for the elasticsearch module
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'manifests/example42.pp', line 6
class elasticsearch::example42 {
### Provide puppi data, if enabled ( puppi => true )
if $elasticsearch::bool_puppi == true {
$classvars=get_class_args()
puppi::ze { 'elasticsearch':
ensure => $elasticsearch::manage_file,
variables => $classvars,
helper => $elasticsearch::puppi_helper,
noop => $elasticsearch::noops,
}
}
### Service monitoring, if enabled ( monitor => true )
if $elasticsearch::bool_monitor == true {
if $elasticsearch::port != '' {
monitor::port { "elasticsearch_${elasticsearch::protocol}_${elasticsearch::port}":
protocol => $elasticsearch::protocol,
port => $elasticsearch::port,
target => $elasticsearch::monitor_target,
tool => $elasticsearch::monitor_tool,
enable => $elasticsearch::manage_monitor,
noop => $elasticsearch::noops,
}
}
if $elasticsearch::service != '' {
monitor::process { 'elasticsearch_process':
process => $elasticsearch::process,
service => $elasticsearch::service,
pidfile => $elasticsearch::pid_file,
user => $elasticsearch::process_user,
argument => $elasticsearch::process_args,
tool => $elasticsearch::monitor_tool,
enable => $elasticsearch::manage_monitor,
noop => $elasticsearch::noops,
}
}
}
### Firewall management, if enabled ( firewall => true )
if $elasticsearch::bool_firewall == true and $elasticsearch::port != '' {
firewall { "elasticsearch_${elasticsearch::protocol}_${elasticsearch::port}":
source => $elasticsearch::firewall_src,
destination => $elasticsearch::firewall_dst,
protocol => $elasticsearch::protocol,
port => $elasticsearch::port,
action => 'allow',
direction => 'input',
tool => $elasticsearch::firewall_tool,
enable => $elasticsearch::manage_firewall,
noop => $elasticsearch::noops,
}
}
}
|