diff options
-rw-r--r-- | manifests/remote_host.pp | 20 |
1 files 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', + } } } } |