Use stronmgswan starter on freebsd and CentOS
This commit is contained in:
parent
ecaceffca7
commit
07aec23f94
|
@ -5,12 +5,30 @@
|
|||
bundle agent strongswan
|
||||
{
|
||||
vars:
|
||||
"ipsec_conf" string => "/etc/ipsec.conf";
|
||||
"ipsec_secrets" string => "/etc/ipsec.secrets";
|
||||
"service_name" string => "ipsec";
|
||||
freebsd::
|
||||
"pkgs" slist => {
|
||||
"strongswan"
|
||||
};
|
||||
"ipsec_conf" string => "/usr/local/etc/ipsec.conf";
|
||||
"ipsec_secrets" string => "/usr/local/etc/ipsec.secrets";
|
||||
"service_name" string => "strongswan";
|
||||
|
||||
debian::
|
||||
"pkgs" slist => {
|
||||
"strongswan"
|
||||
};
|
||||
"ipsec_conf" string => "/etc/ipsec.conf";
|
||||
"ipsec_secrets" string => "/etc/ipsec.secrets";
|
||||
"service_name" string => "ipsec";
|
||||
|
||||
centos::
|
||||
"pkgs" slist => {
|
||||
"strongswan"
|
||||
};
|
||||
"ipsec_conf" string => "/etc/strongswan/ipsec.conf";
|
||||
"ipsec_secrets" string => "/etc/strongswan/ipsec.secrets";
|
||||
"service_name" string => "strongswan-starter";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -18,15 +36,15 @@ vars:
|
|||
bundle agent install_strongswan(cfg)
|
||||
{
|
||||
vars:
|
||||
"js" string => storejson(@(cfg));
|
||||
"service_deps" slist => { "strongswan_ipsec_conf_ready", "strongswan_ipsec_secrets_ready" };
|
||||
freebsd::
|
||||
"service_deps" slist => { "strongswan_ipsec_conf_ready", "strongswan_ipsec_secrets_ready","strongswan_bsdcfg_ready" };
|
||||
|
||||
|
||||
methods:
|
||||
"any" usebundle => wmde_install_packages(@(strongswan.pkgs),"strongswan");
|
||||
"any" usebundle => wmde_service("$(strongswan.service_name)","strongswan_kept","strongswan_repaired"),
|
||||
depends_on => {
|
||||
"strongswan_ipsec_conf_ready",
|
||||
"strongswan_ipsec_secrets_ready"
|
||||
};
|
||||
depends_on => @(service_deps);
|
||||
files:
|
||||
"$(strongswan.ipsec_conf)"
|
||||
create => "true",
|
||||
|
@ -46,8 +64,14 @@ files:
|
|||
classes => if_repaired("strongswan_repaired"),
|
||||
edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/strongswan-ipsec.secrets.mustache";
|
||||
|
||||
|
||||
|
||||
freebsd::
|
||||
"/etc/rc.conf.d/strongswan"
|
||||
create => "true",
|
||||
content =>"strongswan_interface=stroke
|
||||
strongswan_enable=\"YES\"
|
||||
",
|
||||
handle => "strongswan_bsdcfg_ready";
|
||||
|
||||
reports:
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue