wuiet.d.o no longer needs access to projectb on bmdb1
[mirror/dsa-puppet.git] / modules / ssl / manifests / init.pp
index 21e51e6..2474f20 100644 (file)
@@ -1,4 +1,6 @@
-class ssl {
+class ssl (
+       Boolean $insecure_ssl = false
+) {
        package { 'openssl':
                ensure   => installed,
        }
@@ -9,7 +11,7 @@ class ssl {
                ensure   => installed,
        }
 
-       if has_role('insecure_ssl') {
+       if $insecure_ssl {
                $extra_ssl_certs_flags = ' --default'
                $ssl_certs_config = 'puppet:///modules/ssl/ca-certificates-global.conf'
        } else {
@@ -35,11 +37,6 @@ class ssl {
                notify  => Exec['refresh_ca_global_hashes'],
        }
 
-       file { '/etc/apt/apt.conf.d/local-ssl-ca-global':
-               mode   => '0444',
-               content => template('ssl/local-ssl-ca-global.erb'),
-       }
-
        file { '/etc/ssl/certs/ssl-cert-snakeoil.pem':
                ensure => absent,
                notify => Exec['refresh_normal_hashes'],
@@ -145,6 +142,12 @@ class ssl {
                $updatecacerts = $updatecacertsdsa
        }
 
+       file { '/etc/apt/apt.conf.d/local-ssl-ca-global':
+               mode   => '0444',
+               content => template('ssl/local-ssl-ca-global.erb'),
+       }
+
+
        exec { 'refresh_debian_hashes':
                command     => 'c_rehash /etc/ssl/debian/certs',
                refreshonly => true,