当另一个用户的主要群组使用puppet时如何删除群组
我有以下Puppet配方: group{'pablo': ensure => absent, gid => 1020, } user{'pablo': ensure => absent, gid => 1020, managehome => false, } 但是依赖关系是“颠倒的”:用户依赖于组。 这在创build资源时工作正常,但是当我们想要删除时,关系应该是相反的。 目前,用户资源依赖于组,但由于用户本身为主组,所以不能删除组。 糟糕! 确切的错误信息是: Error: Could not delete group pablo: Execution of '/usr/sbin/groupdel pablo' returned 8: groupdel: cannot remove the primary group of user 'pablo' Error: /Stage[main]/Seevibes::Admins/Seevibes::User[pablo]/Group[pablo]/ensure: change from present to absent failed: Could […]