From: Stephen Gran Date: Sat, 28 Apr 2012 15:17:05 +0000 (+0100) Subject: make this templates X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=107a00c9b97e8ba32c823c510bbbe8b747290963;p=mirror%2Fdsa-puppet.git make this templates Signed-off-by: Stephen Gran --- diff --git a/modules/roles/manifests/backports_master.pp b/modules/roles/manifests/backports_master.pp index 68ac31404..38a055a0d 100644 --- a/modules/roles/manifests/backports_master.pp +++ b/modules/roles/manifests/backports_master.pp @@ -10,16 +10,18 @@ class roles::backports_master { default => '', } + $logfile = '/var/log/ftp/vsftpd-backports-master.debian.org.log' + vsftpd::site { 'backports': - source => 'puppet:///modules/roles/backports_master/vsftpd.conf', - logfile => '/var/log/ftp/vsftpd-backports-master.debian.org.log', + content => template('roles/backports_master/vsftpd.conf.erb'), + logfile => $logfile, bind => $bind, } if $bind6 { vsftpd::site { 'backports-v6': - source => 'puppet:///modules/roles/security_mirror/vsftpd.conf', - logfile => '/var/log/ftp/vsftpd-backports-master.debian.org.log', + source => template('roles/backports_mirror/vsftpd.conf.erb'), + logfile => $logfile, bind => $bind6, } } diff --git a/modules/roles/manifests/ftp.pp b/modules/roles/manifests/ftp.pp index 754b98edc..6a0398473 100644 --- a/modules/roles/manifests/ftp.pp +++ b/modules/roles/manifests/ftp.pp @@ -12,16 +12,18 @@ class roles::ftp { default => '', } + $logfile = '/var/log/ftp/vsftpd-ftp.debian.org.log' + vsftpd::site { 'ftp': - source => 'puppet:///modules/roles/ftp/vsftpd.conf', - logfile => '/var/log/ftp/vsftpd-ftp.debian.org.log', + source => template('roles/ftp/vsftpd.conf.erb'), + logfile => $logfile, bind => $bind, } if $bind6 { vsftpd::site { 'ftp-v6': - source => 'puppet:///modules/roles/security_mirror/vsftpd.conf', - logfile => '/var/log/ftp/vsftpd-ftp.debian.org.log', + source => template('roles/ftp/vsftpd.conf.erb'), + logfile => $logfile, bind => $bind6, } } diff --git a/modules/roles/manifests/ftp_upload.pp b/modules/roles/manifests/ftp_upload.pp index abcc6bbd2..807332f43 100644 --- a/modules/roles/manifests/ftp_upload.pp +++ b/modules/roles/manifests/ftp_upload.pp @@ -8,16 +8,18 @@ class roles::ftp_upload { default => '', } + $logfile = '/var/log/ftp/vsftpd-ftp.upload.debian.org.log' + vsftpd::site { 'ftp-upload': - source => 'puppet:///modules/roles/ftp_upload/vsftpd.conf', - logfile => '/var/log/ftp/vsftpd-ftp.upload.debian.org.log', + source => template('roles/ftp_upload/vsftpd.conf.erb'), + logfile => $logfile, bind => $bind, } if $bind6 { vsftpd::site { 'ftp-upload-v6': - source => 'puppet:///modules/roles/security_mirror/vsftpd.conf', - logfile => '/var/log/ftp/vsftpd-ftp.upload.debian.org.log', + source => template('roles/ftp_upload/vsftpd.conf.erb'), + logfile => $logfile, bind => $bind6, } } diff --git a/modules/roles/manifests/security_mirror.pp b/modules/roles/manifests/security_mirror.pp index 5e3ee78fb..2b1baf611 100644 --- a/modules/roles/manifests/security_mirror.pp +++ b/modules/roles/manifests/security_mirror.pp @@ -13,16 +13,18 @@ class roles::security_mirror { default => '', } + $logfile = '/var/log/ftp/vsftpd-security.debian.org.log' + vsftpd::site { 'security': - source => 'puppet:///modules/roles/security_mirror/vsftpd.conf', - logfile => '/var/log/ftp/vsftpd-security.debian.org.log', + source => template('roles/security_mirror/vsftpd.conf.erb'), + logfile => $logfile, bind => $bind, } if $bind6 { vsftpd::site { 'security-v6': - source => 'puppet:///modules/roles/security_mirror/vsftpd.conf', - logfile => '/var/log/ftp/vsftpd-security.debian.org.log', + source => template('roles/security_mirror/vsftpd.conf.erb'), + logfile => $logfile, bind => $bind6, } } diff --git a/modules/roles/templates/backports_master/vsftpd.conf b/modules/roles/templates/backports_master/vsftpd.conf deleted file mode 100644 index 02979ed99..000000000 --- a/modules/roles/templates/backports_master/vsftpd.conf +++ /dev/null @@ -1,19 +0,0 @@ -anonymous_enable=YES -write_enable=YES -anon_root=/srv/backports-upload -anon_umask=027 -anon_upload_enable=YES -chown_uploads=YES -chown_username=dak - -xferlog_enable=YES -xferlog_file=<%= scope.lookupvar('logfile') %> - -ftpd_banner=backports-master.debian.org FTP server -secure_chroot_dir=/var/run/vsftpd -pam_service_name=vsftpd -setproctitle_enable=YES -dirmessage_enable=YES -ls_recurse_enable=NO -connect_from_port_20=NO -max_clients=100 diff --git a/modules/roles/templates/backports_master/vsftpd.conf.erb b/modules/roles/templates/backports_master/vsftpd.conf.erb new file mode 100644 index 000000000..02979ed99 --- /dev/null +++ b/modules/roles/templates/backports_master/vsftpd.conf.erb @@ -0,0 +1,19 @@ +anonymous_enable=YES +write_enable=YES +anon_root=/srv/backports-upload +anon_umask=027 +anon_upload_enable=YES +chown_uploads=YES +chown_username=dak + +xferlog_enable=YES +xferlog_file=<%= scope.lookupvar('logfile') %> + +ftpd_banner=backports-master.debian.org FTP server +secure_chroot_dir=/var/run/vsftpd +pam_service_name=vsftpd +setproctitle_enable=YES +dirmessage_enable=YES +ls_recurse_enable=NO +connect_from_port_20=NO +max_clients=100 diff --git a/modules/roles/templates/ftp/vsftpd.conf b/modules/roles/templates/ftp/vsftpd.conf deleted file mode 100644 index 60ac366ad..000000000 --- a/modules/roles/templates/ftp/vsftpd.conf +++ /dev/null @@ -1,15 +0,0 @@ -ftpd_banner=ftp.debian.org FTP server - -anonymous_enable=YES -dirmessage_enable=YES -connect_from_port_20=NO -setproctitle_enable=YES -ls_recurse_enable=NO -xferlog_enable=YES -xferlog_file=<%= scope.lookupvar('logfile') %> - -secure_chroot_dir=/var/run/vsftpd -pam_service_name=vsftpd - -anon_root=/srv/ftp.debian.org/ftp.root - diff --git a/modules/roles/templates/ftp/vsftpd.conf.erb b/modules/roles/templates/ftp/vsftpd.conf.erb new file mode 100644 index 000000000..60ac366ad --- /dev/null +++ b/modules/roles/templates/ftp/vsftpd.conf.erb @@ -0,0 +1,15 @@ +ftpd_banner=ftp.debian.org FTP server + +anonymous_enable=YES +dirmessage_enable=YES +connect_from_port_20=NO +setproctitle_enable=YES +ls_recurse_enable=NO +xferlog_enable=YES +xferlog_file=<%= scope.lookupvar('logfile') %> + +secure_chroot_dir=/var/run/vsftpd +pam_service_name=vsftpd + +anon_root=/srv/ftp.debian.org/ftp.root + diff --git a/modules/roles/templates/ftp_upload/vsftpd.conf b/modules/roles/templates/ftp_upload/vsftpd.conf deleted file mode 100644 index 30612b09d..000000000 --- a/modules/roles/templates/ftp_upload/vsftpd.conf +++ /dev/null @@ -1,22 +0,0 @@ -ftpd_banner=ftp.upload.debian.org FTP server - -max_clients=100 - -anonymous_enable=YES -dirmessage_enable=YES -connect_from_port_20=NO -setproctitle_enable=YES -ls_recurse_enable=NO -xferlog_enable=YES - -secure_chroot_dir=/var/run/vsftpd -xferlog_file=<%= scope.lookupvar('logfile') %> -pam_service_name=vsftpd - -anon_root=/srv/upload.debian.org/ftp -write_enable=YES -anon_umask=027 -anon_upload_enable=YES -chown_uploads=YES -chown_username=dak - diff --git a/modules/roles/templates/ftp_upload/vsftpd.conf.erb b/modules/roles/templates/ftp_upload/vsftpd.conf.erb new file mode 100644 index 000000000..30612b09d --- /dev/null +++ b/modules/roles/templates/ftp_upload/vsftpd.conf.erb @@ -0,0 +1,22 @@ +ftpd_banner=ftp.upload.debian.org FTP server + +max_clients=100 + +anonymous_enable=YES +dirmessage_enable=YES +connect_from_port_20=NO +setproctitle_enable=YES +ls_recurse_enable=NO +xferlog_enable=YES + +secure_chroot_dir=/var/run/vsftpd +xferlog_file=<%= scope.lookupvar('logfile') %> +pam_service_name=vsftpd + +anon_root=/srv/upload.debian.org/ftp +write_enable=YES +anon_umask=027 +anon_upload_enable=YES +chown_uploads=YES +chown_username=dak + diff --git a/modules/roles/templates/security_mirror/vsftpd.conf b/modules/roles/templates/security_mirror/vsftpd.conf deleted file mode 100644 index f75a96601..000000000 --- a/modules/roles/templates/security_mirror/vsftpd.conf +++ /dev/null @@ -1,13 +0,0 @@ -anonymous_enable=YES -xferlog_enable=YES -secure_chroot_dir=/var/run/vsftpd -pam_service_name=vsftpd -rsa_cert_file=/etc/ssl/certs/vsftpd.pem - -setproctitle_enable=YES -dirmessage_enable=NO -connect_from_port_20=NO -xferlog_file=/var/log/ftp/vsftpd-security.debian.org.log -xferlog_file=<%= scope.lookupvar('logfile') %> -ls_recurse_enable=YES -ftpd_banner=security.debian.org FTP server (vsftpd) diff --git a/modules/roles/templates/security_mirror/vsftpd.conf.erb b/modules/roles/templates/security_mirror/vsftpd.conf.erb new file mode 100644 index 000000000..f75a96601 --- /dev/null +++ b/modules/roles/templates/security_mirror/vsftpd.conf.erb @@ -0,0 +1,13 @@ +anonymous_enable=YES +xferlog_enable=YES +secure_chroot_dir=/var/run/vsftpd +pam_service_name=vsftpd +rsa_cert_file=/etc/ssl/certs/vsftpd.pem + +setproctitle_enable=YES +dirmessage_enable=NO +connect_from_port_20=NO +xferlog_file=/var/log/ftp/vsftpd-security.debian.org.log +xferlog_file=<%= scope.lookupvar('logfile') %> +ls_recurse_enable=YES +ftpd_banner=security.debian.org FTP server (vsftpd)