Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0 < 7.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'openvpn-openvpnas', '0.3.2'
Learn more about managing modules with a PuppetfileDocumentation
puppet-openvpnas
This is a Puppet module for managing the OpenVPN Access Server. Currently it only contains Puppet types and providers, but that will change in the future.
Usage
Installing OpenVPN Access Server
To install OpenVPN Access Server from the official apt/yum repositories is as simple as:
include ::openvpnas
openvpnas_config
To define server configuration parameters use the openvpnas_config type:
openvpnas_config { 'vpn.tls_refresh.interval':
value => '100',
}
You can get a list of configuration keys and their current values with
$ /usr/local/openvpn_as/scripts/sacli ConfigQuery
To convert current Access Server configuration into Puppet code use
$ puppet resource openvpnas_config
openvpnas_userprop
To define Access Server user properties use the openvpnas_userprop type:
openvpnas_userprop { 'openvpn-prop_superuser':
value => 'true',
}
The resource parameter "name" (defaults to resource title) must consist of three parts:
- User or group name (e.g. "DEFAULT" or "openvpn")
- A dash
- Name of the user property to managed (e.g. "prop_superuser")
If the syntax of the title is wrong catalog compilation will fail.
In the user/group name part only word characters, "." and "_" are allowed. If your usernames contain other characters please let us know or, better yet, modify the "name" parameter's validation regexp in lib/puppet/type/openvpnas_userprop.rb and issue a pull request.
You can get a list of current user properties with
$ /usr/local/openvpn_as/scripts/sacli UserPropGet
To convert current user properties into Puppet code use
$ puppet resource openvpnas_userprop
Warnings
Please note that "sacli" does not do any validation on the data it gets: make sure the values you give it make sense or you risk breaking your VPN server configuration. The types also do not automatically trigger a service restart if configuration is changed.
Also note that all properties need to be passed to the types as strings - even those that look like booleans.
The openvpnas_config and openvpnas_userprop types are ensurable, meaning that you can add arbitrary keys and values to the database, or remove any key that is present there. Use extreme caution when removing keys.
Dependencies
- puppetlabs/apt (>= 4.5.0 < 8.0.0)
Copyright 2019 OpenVPN, Inc. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.