From d1b0bf2b4c2112c7cf7cbb596838172937bdd6e7 Mon Sep 17 00:00:00 2001 From: Justin Lambert Date: Sat, 27 Dec 2014 07:21:18 -0700 Subject: [PATCH] ensure users are removed before groups --- manifests/users.pp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/manifests/users.pp b/manifests/users.pp index 859d0f9..9f4da15 100644 --- a/manifests/users.pp +++ b/manifests/users.pp @@ -42,13 +42,18 @@ } } - if $absent_users { + if $absent_users and $absent_groups { user { $absent_users: ensure => 'absent', + } -> + group { $absent_groups: + ensure => 'absent' } - } - - if $absent_groups { + } elsif $absent_users { + user { $absent_users: + ensure => 'absent', + } + } elsif $absent_groups { group { $absent_groups: ensure => 'absent' }