summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorJulien Dessaux2018-03-15 19:02:29 +0100
committerJulien Dessaux2018-03-15 22:19:55 +0100
commitb7bc2437a32b4c214369e2cb6bc0006ca6363c6e (patch)
treeaabfee6f9f9648c605e0f893e0e6c167bc0e1b49 /services
parentUpdated submodules stdlib and modules (diff)
downloadmasterfiles-b7bc2437a32b4c214369e2cb6bc0006ca6363c6e.tar.gz
masterfiles-b7bc2437a32b4c214369e2cb6bc0006ca6363c6e.tar.bz2
masterfiles-b7bc2437a32b4c214369e2cb6bc0006ca6363c6e.zip
Imported some more openvpn tunnels
Diffstat (limited to 'services')
-rw-r--r--services/applications/openvpn.cf8
-rw-r--r--services/main.cf2
2 files changed, 3 insertions, 7 deletions
diff --git a/services/applications/openvpn.cf b/services/applications/openvpn.cf
index 597318f..963c720 100644
--- a/services/applications/openvpn.cf
+++ b/services/applications/openvpn.cf
@@ -3,9 +3,6 @@ bundle agent openvpn
vars:
any::
"tunnels" slist => getindices("g.host_data[tunnels]");
- classes:
- any::
- "$(tunnels)_needs_restart" or => { "openvpn_common_key_repaired", "linux.openvpn_$(tunnels)_conf_repaired" };
files:
any::
"/etc/openvpn/common.key"
@@ -25,7 +22,7 @@ bundle agent openvpn
classes => if_repaired("tunnel_$(tunnels)_service_repaired");
commands:
any::
- "/usr/sbin/service openvpn@$(tunnels) restart" classes => if_repaired("tunnel_$(tunnels)_service_repaired"), ifvarclass => "$(tunnels)_needs_restart";
+ "/usr/sbin/service openvpn@$(tunnels) restart" classes => if_repaired("tunnel_$(tunnels)_service_repaired"), ifvarclass => "openvpn_common_key_repaired";
reports:
any::
"$(this.bundle): common.key repaired" ifvarclass => "openvpn_common_key_repaired";
@@ -36,7 +33,6 @@ bundle agent openvpn_tunnel(tunnel)
{
classes:
any::
- "$(tunnel)_needs_restart" or => { "openvpn_common_key_repaired", "linux.openvpn_$(tunnel)_conf_repaired" };
"has_remote" and => { isvariable("g.host_data[tunnels][$(tunnel)][remote_host]"), isvariable("g.host_data[tunnels][$(tunnel)][remote_port]") };
files:
any::
@@ -49,7 +45,7 @@ bundle agent openvpn_tunnel(tunnel)
classes => if_repaired("openvpn_$(tunnel)_conf_repaired");
commands:
any::
- "/usr/sbin/service openvpn@$(tunnel) restart" classes => if_repaired("tunnel_$(tunnel)_service_repaired"), ifvarclass => "$(tunnel)_needs_restart";
+ "/usr/sbin/service openvpn@$(tunnel) restart" classes => if_repaired("tunnel_$(tunnel)_service_repaired"), ifvarclass => "openvpn_$(tunnel)_conf_repaired";
reports:
any::
"$(this.bundle): $(tunnel).conf repaired" ifvarclass => "openvpn_$(tunnel)_conf_repaired";
diff --git a/services/main.cf b/services/main.cf
index 0d4270f..31e20d5 100644
--- a/services/main.cf
+++ b/services/main.cf
@@ -57,7 +57,7 @@ bundle common g
bundle agent main
{
methods:
- andromeda|collab_jde::
+ linux.!containers::
"andromeda" usebundle => openvpn;
nagios::
"nagios" usebundle => nagios;