Skip to content

Commit

Permalink
Fix host-group member deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
federicoballarini committed Mar 16, 2023
1 parent 3710062 commit b438844
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -30,9 +30,11 @@ my $hostKey = shift || die("Missing host key argument");
my $hdb = esmith::HostsDB->open();

my @groups = ();
my @members = ();

foreach my $record ($hdb->get_all_by_prop('type' => 'host-group')) {
if(($record->prop('Members') || '') eq $hostKey) {
@members = split ',', $record->prop('Members');
if (grep(/^$hostKey$/, @members)) {
push @groups, $record->key;
}
}
Expand Down

0 comments on commit b438844

Please sign in to comment.