From 107a00c9b97e8ba32c823c510bbbe8b747290963 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Sat, 28 Apr 2012 16:17:05 +0100 Subject: [PATCH] make this templates Signed-off-by: Stephen Gran --- modules/roles/manifests/backports_master.pp | 10 ++++++---- modules/roles/manifests/ftp.pp | 10 ++++++---- modules/roles/manifests/ftp_upload.pp | 10 ++++++---- modules/roles/manifests/security_mirror.pp | 10 ++++++---- .../backports_master/{vsftpd.conf => vsftpd.conf.erb} | 0 .../templates/ftp/{vsftpd.conf => vsftpd.conf.erb} | 0 .../ftp_upload/{vsftpd.conf => vsftpd.conf.erb} | 0 .../security_mirror/{vsftpd.conf => vsftpd.conf.erb} | 0 8 files changed, 24 insertions(+), 16 deletions(-) rename modules/roles/templates/backports_master/{vsftpd.conf => vsftpd.conf.erb} (100%) rename modules/roles/templates/ftp/{vsftpd.conf => vsftpd.conf.erb} (100%) rename modules/roles/templates/ftp_upload/{vsftpd.conf => vsftpd.conf.erb} (100%) rename modules/roles/templates/security_mirror/{vsftpd.conf => vsftpd.conf.erb} (100%) 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.erb similarity index 100% rename from modules/roles/templates/backports_master/vsftpd.conf rename to modules/roles/templates/backports_master/vsftpd.conf.erb diff --git a/modules/roles/templates/ftp/vsftpd.conf b/modules/roles/templates/ftp/vsftpd.conf.erb similarity index 100% rename from modules/roles/templates/ftp/vsftpd.conf rename to modules/roles/templates/ftp/vsftpd.conf.erb diff --git a/modules/roles/templates/ftp_upload/vsftpd.conf b/modules/roles/templates/ftp_upload/vsftpd.conf.erb similarity index 100% rename from modules/roles/templates/ftp_upload/vsftpd.conf rename to modules/roles/templates/ftp_upload/vsftpd.conf.erb diff --git a/modules/roles/templates/security_mirror/vsftpd.conf b/modules/roles/templates/security_mirror/vsftpd.conf.erb similarity index 100% rename from modules/roles/templates/security_mirror/vsftpd.conf rename to modules/roles/templates/security_mirror/vsftpd.conf.erb -- 2.20.1