Code Monkey home page Code Monkey logo

puppet-openvpnas's Introduction

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:

  1. User or group name (e.g. "DEFAULT" or "openvpn")
  2. A dash
  3. 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.

puppet-openvpnas's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.