summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2013-01-06 14:51:19 +0100
committermh <mh@immerda.ch>2013-01-06 14:51:19 +0100
commit0f2a764ea138904b1d6c325c843eb23a94edff9f (patch)
tree88fef18582d6a47b3cecd78b4bd0ab60aef11308
parent005caf645dadb4574ee0d40098ab64a581876c7d (diff)
make it possible to not manage the cert
-rw-r--r--manifests/remote_host.pp20
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',
+ }
}
}
}