Puppet Class: isp3node::pureftpd::config

Defined in:
manifests/pureftpd/config.pp

Summary

Configure pureftpd on this host for SSL and ISPConfig

Overview

Examples:

include isp3node::pureftpd::config

Parameters:

  • tlslevel (Integer[0, 2])

    Enable ftp daemon to offer tls connections: 0->off; 1->on; 2->tls only



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'manifests/pureftpd/config.pp', line 7

class isp3node::pureftpd::config(
  Integer[0, 2] $tlslevel,
) {
  $configfile = {
    ensure => present,
    path   => '/etc/default/pure-ftpd-common',
    notify => Service['pure-ftpd-mysql'],
  }
  $settings = {'' => {
    'STANDALONE_OR_INETD' => 'standalone',
    'VIRTUALCHROOT'       => true,
  }}
  create_ini_settings($settings, $configfile)

  file{'pureftpd-conf-tls':
    ensure  => file,
    path    => '/etc/pure-ftpd/conf/TLS',
    content => "${tlslevel}",
    notify  => Service['pure-ftpd-mysql'],
  }
  file{'/etc/ssl/private/pure-ftpd.pem':
      ensure => link,
      owner  => 'root',
      group  => 'root',
      mode   => '0600',
      target => "/etc/ssl/local/${facts['fqdn']}.keybundle.pem",
      notify => Service['pure-ftpd-mysql'],
  }
  file{'/etc/ssl/private/pure-ftpd-dhparams.pem':
    ensure  => link,
    owner   => 'root',
    group   => 'root',
    mode    => '0600',
    target  => '/etc/ssl/local/dhparam.pem',
    notify  => Service['pure-ftpd-mysql'],
    require => Exec['ssl-dhparam'],
  }
}