Skip to content

Commit

Permalink
Merge pull request #61 from bastelfreak/rel210
Browse files Browse the repository at this point in the history
Release 2.1.0
  • Loading branch information
bastelfreak authored Dec 30, 2021
2 parents 91fdaa0 + 4cd8dd0 commit 265089d
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 38 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v2.1.0](https://github.com/voxpupuli/puppet-ipset/tree/v2.1.0) (2021-12-30)

[Full Changelog](https://github.com/voxpupuli/puppet-ipset/compare/v2.0.0...v2.1.0)

**Implemented enhancements:**

- use 'content' instead of 'source' to increase performance [\#60](https://github.com/voxpupuli/puppet-ipset/pull/60) ([kBite](https://github.com/kBite))

**Merged pull requests:**

- Allow stdlib 8.0.0 [\#52](https://github.com/voxpupuli/puppet-ipset/pull/52) ([smortex](https://github.com/smortex))
- switch from camptocamp/systemd to voxpupuli/systemd [\#51](https://github.com/voxpupuli/puppet-ipset/pull/51) ([bastelfreak](https://github.com/bastelfreak))

## [v2.0.0](https://github.com/voxpupuli/puppet-ipset/tree/v2.0.0) (2021-06-03)

[Full Changelog](https://github.com/voxpupuli/puppet-ipset/compare/v1.2.3...v2.0.0)
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# puppet-ipset

[![Build Status](https://travis-ci.org/voxpupuli/puppet-ipset.svg?branch=master)](https://travis-ci.org/voxpupuli/puppet-ipset)
[![Build Status](https://github.com/voxpupuli/puppet-ipset/workflows/CI/badge.svg)](https://github.com/voxpupuli/puppet-ipset/actions?query=workflow%3ACI)
[![Release](https://github.com/voxpupuli/puppet-ipset/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/puppet-ipset/actions/workflows/release.yml)
[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/ipset.svg)](https://forge.puppetlabs.com/puppet/ipset)
[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/ipset.svg)](https://forge.puppetlabs.com/puppet/ipset)
[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/ipset.svg)](https://forge.puppetlabs.com/puppet/ipset)
[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/ipset.svg)](https://forge.puppetlabs.com/puppet/ipset)
[![puppetmodule.info docs](http://www.puppetmodule.info/images/badge.png)](http://www.puppetmodule.info/m/puppet-ipset)
[![AGPL v3 License](https://img.shields.io/github/license/voxpupuli/puppet-ipset.svg)](LICENSE)

## Table of Contents

Expand Down
125 changes: 89 additions & 36 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,61 +24,78 @@

## Classes

### `ipset`
### <a name="ipset"></a>`ipset`

module to install the ipset tooling and to manage individual ipsets

#### Parameters

The following parameters are available in the `ipset` class.
The following parameters are available in the `ipset` class:

##### `packages`
* [`packages`](#packages)
* [`service`](#service)
* [`service_ensure`](#service_ensure)
* [`enable`](#enable)
* [`firewall_service`](#firewall_service)
* [`package_ensure`](#package_ensure)
* [`config_path`](#config_path)
* [`sets`](#sets)

##### <a name="packages"></a>`packages`

Data type: `Array[String[1]]`

The name of the package we want to install

##### `service`
##### <a name="service"></a>`service`

Data type: `String[1]`

The name of the service that we're going to manage

##### `service_ensure`
##### <a name="service_ensure"></a>`service_ensure`

Data type: `Boolean`

Desired state of the service. If true, the service will be running. If false, the service will be stopped

##### `enable`
##### <a name="enable"></a>`enable`

Data type: `Boolean`

Boolean to decide if we want to have the service in autostart or not

##### `firewall_service`
##### <a name="firewall_service"></a>`firewall_service`

Data type: `Optional[Pattern[/\.service$/]]`

An optional service name. if provided, the ipsets will be configured before this. So your firewall will depend on the chains. The name should end with `.service`. This is only supported on systemd-based Operating Systems

Default value: ``undef``

##### `package_ensure`
##### <a name="package_ensure"></a>`package_ensure`

Data type: `Enum['present', 'absent', 'latest']`

ensure parameter for the ipset package resource

##### `config_path`
##### <a name="config_path"></a>`config_path`

Data type: `Stdlib::Absolutepath`

path to the directory for the ipsets

##### <a name="sets"></a>`sets`

Data type: `Hash`

Hash Hash of 'ipset::set' resources

Default value: `{}`

## Defined types

### `ipset::set`
### <a name="ipsetset"></a>`ipset::set`

Declare an IP Set.

Expand Down Expand Up @@ -156,39 +173,46 @@ ferm::ipset{'INPUT':

#### Parameters

The following parameters are available in the `ipset::set` defined type.
The following parameters are available in the `ipset::set` defined type:

* [`set`](#set)
* [`ensure`](#ensure)
* [`type`](#type)
* [`options`](#options)
* [`ignore_contents`](#ignore_contents)
* [`keep_in_sync`](#keep_in_sync)

##### `set`
##### <a name="set"></a>`set`

Data type: `IPSet::Settype`

IP set content or source.

##### `ensure`
##### <a name="ensure"></a>`ensure`

Data type: `Enum['present', 'absent']`

Should the IP set be created or removed ?

Default value: `'present'`

##### `type`
##### <a name="type"></a>`type`

Data type: `IPSet::Type`

Type of IP set.

Default value: `'hash:ip'`

##### `options`
##### <a name="options"></a>`options`

Data type: `IPSet::Options`

IP set options.

Default value: `{}`

##### `ignore_contents`
##### <a name="ignore_contents"></a>`ignore_contents`

Data type: `Boolean`

Expand All @@ -197,7 +221,7 @@ managed, but not its content.

Default value: ``false``

##### `keep_in_sync`
##### <a name="keep_in_sync"></a>`keep_in_sync`

Data type: `Boolean`

Expand All @@ -206,7 +230,7 @@ memory. If ``false``, it will only update the IP sets on the filesystem.

Default value: ``true``

### `ipset::unmanaged`
### <a name="ipsetunmanaged"></a>`ipset::unmanaged`

Declare an IP set, without managing its content.

Expand All @@ -228,33 +252,38 @@ ipset::unmanaged { 'unmanaged-ipset-name': }

#### Parameters

The following parameters are available in the `ipset::unmanaged` defined type.
The following parameters are available in the `ipset::unmanaged` defined type:

##### `ensure`
* [`ensure`](#ensure)
* [`type`](#type)
* [`options`](#options)
* [`keep_in_sync`](#keep_in_sync)

##### <a name="ensure"></a>`ensure`

Data type: `Enum['present', 'absent']`

Should the IP set be created or removed ?

Default value: `'present'`

##### `type`
##### <a name="type"></a>`type`

Data type: `IPSet::Type`

Type of IP set.

Default value: `'hash:ip'`

##### `options`
##### <a name="options"></a>`options`

Data type: `IPSet::Options`

IP set options.

Default value: `{}`

##### `keep_in_sync`
##### <a name="keep_in_sync"></a>`keep_in_sync`

Data type: `Boolean`

Expand All @@ -265,52 +294,76 @@ Default value: ``true``

## Data types

### `IPSet::Options`
### <a name="ipsetoptions"></a>`IPSet::Options`

list of options you can configure on an ipset

* **See also**
* http://ipset.netfilter.org/ipset.man.html#lbAI

Alias of `Struct[{
Alias of

```puppet
Struct[{
Optional[family] => Enum['inet', 'inet6'],
Optional[hashsize] => Integer[128],
Optional[maxelem] => Integer[128],
Optional[netmask] => IP::Address,
Optional[timeout] => Integer[1],
}]`
}]
```

### `IPSet::Set::Array`
### <a name="ipsetsetarray"></a>`IPSet::Set::Array`

type to allow an array of ip addresses

Alias of `Array[String]`
Alias of

```puppet
Array[String]
```

### `IPSet::Set::File_URL`
### <a name="ipsetsetfile_url"></a>`IPSet::Set::File_URL`

type to allow a static file on the target system as source for ipsets

Alias of `Pattern[/^file:\/\/\//]`
Alias of

```puppet
Pattern[/^file:\/\/\//]
```

### `IPSet::Set::Puppet_URL`
### <a name="ipsetsetpuppet_url"></a>`IPSet::Set::Puppet_URL`

type to allow a file on the puppetserver as source for ip addresses for ipsets

Alias of `Pattern[/^puppet:\/\//]`
Alias of

```puppet
Pattern[/^puppet:\/\//]
```

### `IPSet::Settype`
### <a name="ipsetsettype"></a>`IPSet::Settype`

different datatypes that provides prefixes for the actual ipset

Alias of `Variant[IPSet::Set::Array, IPSet::Set::Puppet_URL, IPSet::Set::File_URL, String]`
Alias of

### `IPSet::Type`
```puppet
Variant[IPSet::Set::Array, IPSet::Set::Puppet_URL, IPSet::Set::File_URL, String]
```

### <a name="ipsettype"></a>`IPSet::Type`

type to allow all different hash setups for ipsets

* **See also**
* http://ipset.netfilter.org/ipset.man.html#lbAW
* documentation for all different hash options

Alias of `Enum['hash:ip', 'hash:ip,port', 'hash:ip,port,ip', 'hash:ip,port,net', 'hash:ip,mark', 'hash:net', 'hash:net,net', 'hash:net,iface', 'hash:net,port', 'hash:net,port,net', 'hash:mac']`
Alias of

```puppet
Enum['hash:ip', 'hash:ip,port', 'hash:ip,port,ip', 'hash:ip,port,net', 'hash:ip,mark', 'hash:net', 'hash:net,net', 'hash:net,iface', 'hash:net,port', 'hash:net,port,net', 'hash:mac']
```

2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-ipset",
"version": "2.0.1-rc0",
"version": "2.1.0",
"author": "Vox Pupuli",
"summary": "Linux ipsets management",
"license": "AGPL-3.0",
Expand Down

0 comments on commit 265089d

Please sign in to comment.