Defined Type: ipset::unmanaged

Defined in:
manifests/unmanaged.pp

Overview

Declare an IP set, without managing its content.

Useful when you have a dynamic process that generates an IP set content, but still want to define and use it from Puppet.

<aside class=“warning”> When changing IP set attributes (type, options) contents won’t be kept, set will be recreated as empty. </aside>

Examples:

ipset::unmanaged { 'unmanaged-ipset-name': }

Parameters:

  • ensure (Enum['present', 'absent']) (defaults to: 'present')

    Should the IP set be created or removed ?

  • type (IPSet::Type) (defaults to: 'hash:ip')

    Type of IP set.

  • options (IPSet::Options) (defaults to: {})

    IP set options.

  • keep_in_sync (Boolean) (defaults to: true)

    If “true“, Puppet will update the IP set in the kernel memory. If “false“, it will only update the IP sets on the filesystem.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'manifests/unmanaged.pp', line 20

define ipset::unmanaged (
  Enum['present', 'absent'] $ensure = 'present',
  IPSet::Type $type = 'hash:ip',
  IPSet::Options $options = {},
  Boolean $keep_in_sync = true,
) {
  ipset::set { $title:
    ensure          => $ensure,
    set             => '',
    ignore_contents => true,
    type            => $type,
    options         => $options,
    keep_in_sync    => $keep_in_sync,
  }
}