Remove unmanaged ssh keys
authorJan Dittberner <jan@dittberner.info>
Thu, 13 Apr 2017 12:35:15 +0000 (14:35 +0200)
committerJan Dittberner <jan@dittberner.info>
Thu, 13 Apr 2017 12:35:15 +0000 (14:35 +0200)
sitemodules/profiles/manifests/base.pp

index f892bce..dcc2cc1 100644 (file)
@@ -41,12 +41,13 @@ class profiles::base (
       ensure => present,
     } ->
     user { $user['username']:
-      ensure   => present,
-      comment  => $user['fullname'],
-      gid      => $user['username'],
-      groups   => ['sudo', 'adm'],
-      password => $user['password'],
-      uid      => $user['uid'],
+      ensure         => present,
+      comment        => $user['fullname'],
+      gid            => $user['username'],
+      groups         => ['sudo', 'adm'],
+      password       => $user['password'],
+      uid            => $user['uid'],
+      purge_ssh_keys => true,
     }
     $user['ssh_keys'].each |Hash[String, Data] $keydata| {
        $osusername = $user['username']