diff options
author | irregulator <irregulator@riseup.net> | 2014-09-25 16:46:57 +0300 |
---|---|---|
committer | irregulator <irregulator@riseup.net> | 2014-09-25 16:46:57 +0300 |
commit | 8f8862aab798cbf0b2dbb690a154cd54dd5d6592 (patch) | |
tree | e896b98df5e53113e6368702f4971aac5c66f1df /puppet/modules/site_obfsproxy/manifests | |
parent | 6b28dd3a0725fa336bb1a4b08471811604601d0f (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.pp | 14 |
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 |