summaryrefslogtreecommitdiff
path: root/puppet/modules/site_obfsproxy/manifests
diff options
context:
space:
mode:
authorirregulator <irregulator@riseup.net>2014-09-25 16:46:57 +0300
committerirregulator <irregulator@riseup.net>2014-09-25 16:46:57 +0300
commit8f8862aab798cbf0b2dbb690a154cd54dd5d6592 (patch)
treee896b98df5e53113e6368702f4971aac5c66f1df /puppet/modules/site_obfsproxy/manifests
parent6b28dd3a0725fa336bb1a4b08471811604601d0f (diff)
Use member function instead of regexp to check services array
Diffstat (limited to 'puppet/modules/site_obfsproxy/manifests')
-rw-r--r--puppet/modules/site_obfsproxy/manifests/init.pp14
1 files changed, 7 insertions, 7 deletions
diff --git a/puppet/modules/site_obfsproxy/manifests/init.pp b/puppet/modules/site_obfsproxy/manifests/init.pp
index 40b7fba8..6275ebee 100644
--- a/puppet/modules/site_obfsproxy/manifests/init.pp
+++ b/puppet/modules/site_obfsproxy/manifests/init.pp
@@ -11,13 +11,13 @@ class site_obfsproxy {
$dest_ip = $obfsproxy['gateway_address']
$dest_port = '443'
- if $::services =~ /\bopenvpn\b/ {
- $openvpn = hiera('openvpn')
- $bind_address = $openvpn['gateway_address']
- }
- elsif $::services =~ /\bobfsproxy\b/ {
- $bind_address = hiera('ip_address')
- }
+ if member($::services, 'openvpn') {
+ $openvpn = hiera('openvpn')
+ $bind_address = $openvpn['gateway_address']
+ }
+ elsif member($::services, 'obfsproxy') {
+ $bind_address = hiera('ip_address')
+ }
include site_apt::preferences::twisted
include site_apt::preferences::obfsproxy