Puppet Class: conntrackd
- Defined in:
- manifests/init.pp
Summary
This class is able to install or remove conntrackd on a node. ItOverview
# conntrackd
manages the status and configuration of the service.
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
# File 'manifests/init.pp', line 300
class conntrackd (
Enum['present', 'absent'] $ensure,
Boolean $autoupgrade,
# Workaround for https://github.com/voxpupuli/puppet-lint-trailing_comma-check/issues/16
# lint:ignore:trailing_comma
Enum[
'enabled',
'disabled',
'running',
'unmanaged'
] $status,
# lint:endignore
Array $package,
String $service_name,
Boolean $service_hasrestart,
Boolean $service_hasstatus,
String $service_pattern,
String $service_status,
String $config_dir,
String $config_filename,
Integer[-20,19] $nice,
Integer $hashsize,
String $logfile,
String $syslog,
String $lockfile,
String $sock_path,
Integer $sock_backlog,
Array $ignore_ips_ipv4,
Array $ignore_ips_ipv6,
Array $tcp_flows,
Integer $netlinkbuffersize,
Integer $netlinkbuffersizemaxgrowth,
String $netlinkoverrunresync,
String $netlinkeventsreliable,
Optional[Integer] $pollsecs,
Integer $eventiterationlimit,
Enum['FTFW', 'NOTRACK', 'ALARM'] $sync_mode,
Integer $resend_queue_size,
Integer $ack_window_size,
String $disable_external_cache,
String $disable_internal_cache,
Integer $refresh_time,
Integer $cache_timeout,
Integer $commit_timeout,
Integer $purge_timeout,
Enum['Multicast', 'UDP'] $protocol,
String $interface,
String $ipv4_address,
String $ipv4_interface,
String $mcast_group,
Integer $sndsocketbuffer,
Integer $rcvsocketbuffer,
String $checksum,
Optional[String] $udp_ipv6_address,
Optional[String] $udp_ipv4_dest,
Optional[String] $udp_ipv6_dest,
Integer $udp_port,
Array $filter_accept_protocols,
String $tcp_window_tracking,
Array $track_tcp_states,
String $scheduler_type,
String $scheduler_priority,
Optional[String] $stats_logfile,
String $stats_netlink_reliable,
Optional[String] $stats_syslog,
# -- Set the hashlimit to be double the sysctl valueof net.nf_conntrack_max
# uses custom fact defined in this module
Optional[Integer] $hashlimit = undef,
) {
#### Validate parameters
if $hashlimit {
$_hashlimit = $hashlimit
} elsif $facts['nf_conntrack_max'] {
$_hashlimit = $facts['nf_conntrack_max'] * 2
} else {
$_hashlimit = 131072
}
#### Manage actions
# package
include conntrackd::package
# service
include conntrackd::service
#### Manage relationships
if $ensure == 'present' {
include conntrackd::config
# we need the software before running a service
Class['conntrackd::package'] -> Class['conntrackd::config'] ~> Class['conntrackd::service']
} else {
# make sure all services are getting stopped before software removal
Class['conntrackd::service'] -> Class['conntrackd::package']
}
}
|