From 0f2a764ea138904b1d6c325c843eb23a94edff9f Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 6 Jan 2013 14:51:19 +0100 Subject: make it possible to not manage the cert --- manifests/remote_host.pp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/manifests/remote_host.pp b/manifests/remote_host.pp index 059d969..f61b7fd 100644 --- a/manifests/remote_host.pp +++ b/manifests/remote_host.pp @@ -25,15 +25,17 @@ define strongswan::remote_host( } } - strongswan::cert{$name: } - if ($right_cert_content != 'absent') and ($ensure == 'present') { - Strongswan::Cert[$name]{ - ensure => $ensure, - cert => $right_cert_content, - } - } else { - Strongswan::Cert[$name]{ - ensure => 'absent', + if $right_cert_content != 'unmanaged' { + strongswan::cert{$right_cert_name: } + if ($right_cert_content != 'absent') and ($ensure == 'present') { + Strongswan::Cert[$right_cert_name]{ + ensure => $ensure, + cert => $right_cert_content, + } + } else { + Strongswan::Cert[$right_cert_name]{ + ensure => 'absent', + } } } } -- cgit v1.2.3