From 76e6ee3e854f5efd018dedc15af14d62e7f4549e Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 19 Apr 2015 23:05:43 +0200 Subject: setting owner, group & mode is not supported by latest concat module --- manifests/daemon/control.pp | 3 --- 1 file changed, 3 deletions(-) (limited to 'manifests/daemon/control.pp') diff --git a/manifests/daemon/control.pp b/manifests/daemon/control.pp index 0172656..001e2b2 100644 --- a/manifests/daemon/control.pp +++ b/manifests/daemon/control.pp @@ -18,9 +18,6 @@ define tor::daemon::control( concat::fragment { '04.control': ensure => $ensure, content => template('tor/torrc.control.erb'), - owner => 'debian-tor', - group => 'debian-tor', - mode => '0600', order => 04, target => $tor::daemon::config_file, } -- cgit v1.2.3 From 28b9509b148675d48e721c069491735b8141aff2 Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 19 Apr 2015 23:19:33 +0200 Subject: linting --- manifests/daemon/control.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/daemon/control.pp') diff --git a/manifests/daemon/control.pp b/manifests/daemon/control.pp index 001e2b2..5e81c65 100644 --- a/manifests/daemon/control.pp +++ b/manifests/daemon/control.pp @@ -18,7 +18,7 @@ define tor::daemon::control( concat::fragment { '04.control': ensure => $ensure, content => template('tor/torrc.control.erb'), - order => 04, + order => '04', target => $tor::daemon::config_file, } } -- cgit v1.2.3 From 1fcbe72115d57d53fced2777c8b54a4ee4ec17e9 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 30 Aug 2017 18:30:12 +0200 Subject: make it work with newer concat module --- manifests/daemon/control.pp | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'manifests/daemon/control.pp') diff --git a/manifests/daemon/control.pp b/manifests/daemon/control.pp index 5e81c65..027a49d 100644 --- a/manifests/daemon/control.pp +++ b/manifests/daemon/control.pp @@ -1,24 +1,26 @@ # control definition define tor::daemon::control( + $ensure = 'present', $port = 0, $hashed_control_password = '', $cookie_authentication = 0, $cookie_auth_file = '', $cookie_auth_file_group_readable = '', - $ensure = present ) { +) { - if $cookie_authentication == '0' and $hashed_control_password == '' and $ensure != 'absent' { - fail('You need to define the tor control password') - } + if $ensure == 'present' { + if $cookie_authentication == '0' and $hashed_control_password == '' { + fail('You need to define the tor control password') + } - if $cookie_authentication == 0 and ($cookie_auth_file != '' or $cookie_auth_file_group_readable != '') { - notice('You set a tor cookie authentication option, but do not have cookie_authentication on') - } + if $cookie_authentication == 0 and ($cookie_auth_file != '' or $cookie_auth_file_group_readable != '') { + notice('You set a tor cookie authentication option, but do not have cookie_authentication on') + } - concat::fragment { '04.control': - ensure => $ensure, - content => template('tor/torrc.control.erb'), - order => '04', - target => $tor::daemon::config_file, + concat::fragment { '04.control': + content => template('tor/torrc.control.erb'), + order => '04', + target => $tor::daemon::config_file, + } } } -- cgit v1.2.3