From c8b19247f0fda2eb94f93a738db5d6aa319a75b2 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 31 Dec 2014 15:31:17 -0200 Subject: Template: saned.conf.erb --- files/etc/sane.d/saned.conf | 33 --------------------------------- manifests/subsystem/scanner.pp | 4 ++-- templates/sane.d/saned.conf.erb | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 files/etc/sane.d/saned.conf create mode 100644 templates/sane.d/saned.conf.erb diff --git a/files/etc/sane.d/saned.conf b/files/etc/sane.d/saned.conf deleted file mode 100644 index f61de7a..0000000 --- a/files/etc/sane.d/saned.conf +++ /dev/null @@ -1,33 +0,0 @@ -# saned.conf -# Configuration for the saned daemon - -## Daemon options -# Port range for the data connection. Choose a range inside [1024 - 65535]. -# Avoid specifying too large a range, for performance reasons. -# -# ONLY use this if your saned server is sitting behind a firewall. If your -# firewall is a Linux machine, we strongly recommend using the -# Netfilter nf_conntrack_sane connection tracking module instead. -# -# data_portrange = 10000 - 10100 -data_portrange = 10000 - 10100 - - -## Access list -# A list of host names, IP addresses or IP subnets (CIDR notation) that -# are permitted to use local SANE devices. IPv6 addresses must be enclosed -# in brackets, and should always be specified in their compressed form. -# -# The hostname matching is not case-sensitive. - -#scan-client.somedomain.firm -#192.168.0.1 -#192.168.0.1/29 -#[2001:7a8:185e::42:12] -#[2001:7a8:185e::42:12]/64 -192.168.1.0/24 - -# NOTE: /etc/inetd.conf (or /etc/xinetd.conf) and -# /etc/services must also be properly configured to start -# the saned daemon as documented in saned(8), services(4) -# and inetd.conf(4) (or xinetd.conf(5)). diff --git a/manifests/subsystem/scanner.pp b/manifests/subsystem/scanner.pp index 021b70c..8b916b0 100644 --- a/manifests/subsystem/scanner.pp +++ b/manifests/subsystem/scanner.pp @@ -1,4 +1,4 @@ -class nodo::subsystem::scanner { +class nodo::subsystem::scanner($access_list = hiera('nodo::subsystem::scanner::access_list', '')) { package { 'sane': ensure => present, } @@ -39,7 +39,7 @@ class nodo::subsystem::scanner { owner => 'root', group => 'root', mode => '0644', - source => 'puppet:///modules/nodo/etc/sane.d/saned.conf', + content => template('nodo/sane.d/saned.conf.erb'), require => Package['sane'], } diff --git a/templates/sane.d/saned.conf.erb b/templates/sane.d/saned.conf.erb new file mode 100644 index 0000000..38ca9ed --- /dev/null +++ b/templates/sane.d/saned.conf.erb @@ -0,0 +1,33 @@ +# saned.conf +# Configuration for the saned daemon + +## Daemon options +# Port range for the data connection. Choose a range inside [1024 - 65535]. +# Avoid specifying too large a range, for performance reasons. +# +# ONLY use this if your saned server is sitting behind a firewall. If your +# firewall is a Linux machine, we strongly recommend using the +# Netfilter nf_conntrack_sane connection tracking module instead. +# +# data_portrange = 10000 - 10100 +data_portrange = 10000 - 10100 + + +## Access list +# A list of host names, IP addresses or IP subnets (CIDR notation) that +# are permitted to use local SANE devices. IPv6 addresses must be enclosed +# in brackets, and should always be specified in their compressed form. +# +# The hostname matching is not case-sensitive. + +#scan-client.somedomain.firm +#192.168.0.1 +#192.168.0.1/29 +#[2001:7a8:185e::42:12] +#[2001:7a8:185e::42:12]/64 +<%= access_list %> + +# NOTE: /etc/inetd.conf (or /etc/xinetd.conf) and +# /etc/services must also be properly configured to start +# the saned daemon as documented in saned(8), services(4) +# and inetd.conf(4) (or xinetd.conf(5)). -- cgit v1.2.3