This module will manage pptp in your system.
This is a very simple module, usually used for development and test purposes.
Yes, you can use it in production, but it is a simple module, you may miss some parameters for production use.
The main objective is to manage pptp with minimal intervention in the default files.
This module was tested under these platforms, all in x86_64 arch:
- RedHat 7
- CentOS 7
- Scientific 7
- Oracle Linux 7
- Debian 9
- Ubuntu 16.04
- SLES 12
You need internet access to install packages.
- Puppet >= 5.x
- Hiera >= 3.4
- Facter >= 2.5
Via git:
# cd /etc/puppetlabs/code/environment/production/modules
# git clone https://github.com/instruct-br/puppet-pptp.git pptp
Via puppet:
# puppet module install instruct/pptp
Via puppetfile
:
mod 'instruct-pptp'
puppet apply -e "include pptp"
class { 'pptp':
package_name = 'pptp',
package_manage = true,
module_manage = true,
firewall_manage = false,
connections = [],
package_ensure = 'latest',
}
pptp
pptp::install (private)
pptp::service (private)
pptp::connections (private)
Type: String
The name of the package to install
Type: Boolean
Should the package be managed or not. Default to true.
Type: Boolean
Should the kernel module be managed or not. Default to true.
Type: Boolean
Should the firewall rule be managed or not. Default to true.
Type: Array
List of connections to be configured. Default to empty list.
Type: Enum['present','installed','absent','purged','held','latest']
The type of ensure the managed package should be enforced. Default to latest.
Type: String
The name of the file with the configuration. Default to /etc/pptp/options.pptp
.
Type: Array[String]
A list with PPTP options, as strings. Default to an empty array.
---
pptp::firewall_manage: true
pptp::module_manage: true
pptp::options:
- require-mppe-128
- require-mschap-v2
pptp::options_file: '/etc/ppp/options.pptp'
pptp::package_ensure: installed
pptp::package_manage: true
pptp::package_name: 'pptp'
This is the Hiera v5 configuration inside the module.
This module does not have params class, everything is under hiera v5.
---
version: 5
defaults:
datadir: data
data_hash: yaml_data
hierarchy:
- name: "OSes"
paths:
- "oses/distro/%{facts.os.name}/%{facts.os.release.major}.yaml"
- "oses/family/%{facts.os.family}.yaml"
- name: "common"
path: "common.yaml"
This is an example of files under modules/pptp/data
common.yaml
oses/family/RedHat.yaml
oses/family/Debian.yaml
oses/family/Suse.yaml
oses/distro/CentOS/7.yaml
oses/distro/Scientific/7.yaml
oses/distro/OracleLinux/7.yaml
This module was developed using
- Puppet 5.5.3
- Hiera 3.4.3 (v5 format)
- Facter 3.11.2
- CentOS 7.5
- VirtualBox 5.2.12
- Vagrant 2.1.1
This module uses puppet-lint, puppet-syntax, metadata-json-lint, rspec-puppet, beaker and travis-ci. We hope you use them before submitting your PR.
gem install bundler --no-document
bundle install --without development
bundle exec rake syntax
bundle exec rake lint
bundle exec rake metadata_lint
bundle exec rake spec
Taciano Tres (taciano at instruct dot com dot br)