Skip to content

Commit

Permalink
convert pureftpd::config_pgsql from a define into a class
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hoblitt committed Aug 2, 2013
1 parent d8bff85 commit 53b9f74
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions manifests/config_pgsql.pp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
# === TODO:
# - implement template and variables for the pgsql config file
#
define pureftpd::config_pgsql(
class pureftpd::config_pgsql (
$use_selinux = false,
$allow_anonymous = false,
$allow_fxp = false,
Expand All @@ -81,32 +81,7 @@
$use_tls = false,
$force_passive_ip = undef,
$motd_file = undef
){

class { 'pureftpd':
use_selinux => $use_selinux
}

$default_auth = 'pgsql'

if ($motd_file != undef) {
file { '/etc/motd.pureftpd':
ensure => file,
source => $motd_file,
owner => 'root',
group => 'root',
mode => '0644'
}
}

file { "${pureftpd::params::config_dir}/pure-ftpd.conf":
ensure => file,
content => template("${module_name}/${::osfamily}/pure-ftpd.conf.erb"),
owner => 'root',
group => 'root',
mode => '0644',
notify => Service[$pureftpd::params::service_name]
}
) {

file { "${pureftpd::params::config_dir}/pureftpd-pgsql.conf":
ensure => file,
Expand All @@ -116,5 +91,4 @@
mode => '0644',
notify => Service[$pureftpd::params::service_name]
}

}

0 comments on commit 53b9f74

Please sign in to comment.