summaryrefslogtreecommitdiff
path: root/puppet/modules/obfsproxy/manifests
diff options
context:
space:
mode:
authorirregulator <irregulator@riseup.net>2014-05-21 21:52:14 +0300
committerelijah <elijah@riseup.net>2014-07-01 16:05:40 -0700
commit94e0791cff9a3ce47e66c56a921e41b83b52b3d9 (patch)
tree2d01e15f003cf4a2484ca7710eee75d1e6542878 /puppet/modules/obfsproxy/manifests
parent156c2e1194c65d2f7813b946ac8baa90ffdf1f39 (diff)
Add data directory to save scramblesuit's state.
Also clean up a little the obfsproxy puppet class, create appropriate directories, restrict permissions.
Diffstat (limited to 'puppet/modules/obfsproxy/manifests')
-rw-r--r--puppet/modules/obfsproxy/manifests/init.pp30
1 files changed, 20 insertions, 10 deletions
diff --git a/puppet/modules/obfsproxy/manifests/init.pp b/puppet/modules/obfsproxy/manifests/init.pp
index 4deebb62..c15a0dc8 100644
--- a/puppet/modules/obfsproxy/manifests/init.pp
+++ b/puppet/modules/obfsproxy/manifests/init.pp
@@ -6,13 +6,16 @@ class obfsproxy (
$dest_port
){
- user { obfsproxy:
+ $user = 'obfsproxy'
+ $conf = '/etc/obfsproxy/obfsproxy.conf'
+
+ user { $user:
ensure => present,
system => true,
- gid => obfsproxy,
+ gid => $user,
}
- group { obfsproxy:
+ group { $user:
ensure => present,
system => true,
}
@@ -31,19 +34,26 @@ class obfsproxy (
source => 'puppet:///modules/obfsproxy/obfsproxy_daemon',
owner => 'root',
group => 'root',
- mode => '0755',
- require => File['/etc/obfsproxy.conf'],
- subscribe => File['/etc/obfsproxy.conf'],
- #content => template('obfsproxy/etc_init_d.erb'),
+ mode => '0750',
+ require => File[$conf],
+ subscribe => File[$conf],
}
- file { '/etc/obfsproxy.conf':
- path => '/etc/obfsproxy.conf',
+ file { $conf :
+ path => $conf,
ensure => present,
owner => 'root',
group => 'root',
- mode => '0750',
+ mode => '0600',
content => template('obfsproxy/etc_conf.erb'),
+ require => File['/etc/obfsproxy'],
+ }
+
+ file { '/etc/obfsproxy':
+ ensure => directory,
+ owner => $user,
+ group => $user,
+ mode => '0700',
}
package { "obfsproxy":