Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing file resource if using default server_type #3

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@
}
}

if $pureftpd::config_auth_puredb {
file { "${pureftpd::config_dir}/../auth/50pure":
ensure => 'link',
target => "${pureftpd::config_dir}/PureDB",
notify => Service['pureftpd']
}
}

file { $pureftpd::defaults_file:
ensure => file,
content => template('pureftpd/defaults.erb'),
Expand Down Expand Up @@ -121,8 +129,10 @@
# only notify service if we're managing the service and
# service restart is enabled.
if $pureftpd::restart and $pureftpd::service_manage {
File["pureftpd-config-${pureftpd::server_type}"] {
notify => Service['pureftpd']
if $pureftpd::server_type != 'default' {
File["pureftpd-config-${pureftpd::server_type}"] {
notify => Service['pureftpd']
}
}
File[$pureftpd::dir_aliases_file] {
notify => Service['pureftpd']
Expand All @@ -132,6 +142,18 @@
}

}

# Ensure that adm group can read FTP logs.
# Requires config_db_dir so that we know pureftp has been installed.
file { '/var/log/pure-ftpd' :
ensure => directory,
owner => 'root',
group => 'adm',
mode => '0640',
recurse => true,
require => File[$pureftpd::config_db_dir],
}

}

# manage self-signed ssl certificate if enabled
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
$config_db_dir = $pureftpd::params::config_db_dir,
$config_dir = $pureftpd::params::config_dir,
$config_manage = $pureftpd::params::config_manage,
$config_auth_puredb = false,
$dir_aliases = {},
$dir_aliases_file = $pureftpd::params::dir_aliases_file,
$install_options = undef,
Expand Down