[rex-users] ensure group => absent

  • From: Alan Batie <alan@xxxxxxxx>
  • To: rex-users@xxxxxxxxxxxxx
  • Date: Thu, 25 Jan 2018 17:23:05 -0800

I was getting an error on:

group "games", ensure => "absent";

when the group didn't exist.

When I looked at the code (Rex/User/Linux.pm), I see:

----
sub rm_group {
  my ( $self, $group ) = @_;

  i_run "/usr/sbin/groupdel $group", fail_ok => 1;
  if ( $? != 0 ) {
    die("Error deleting group $group");
  }
}
----

Why is the if $? check being done if fail_ok is being set?  I've
commented that if statement out...


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Other related posts:

  • » [rex-users] ensure group => absent - Alan Batie