Hi,
ich versuche gerade alle Client-Gruppen auf einem Opsi-Server zu ermitteln, die keine Untergruppe einer anderen sind. Dafür versuche ich mit folgendem Aufruf zu filtern:
method group_getObjects '' '{"parentGroupId": null, "type": "HostGroup"}'
Dabei werden aber alle Gruppenobjekte angezeigt, egal welche "parentGroupId" sie haben. Gibt es einen Weg die JSON-Daten nach "null"-Werten zu filtern?
Danke im Voraus
Opsi-Admin Output mit null Wert filtern
Re: Opsi-Admin Output mit null Wert filtern
Ist zwar nur ein Workaround:
Code: Alles auswählen
opsi-admin method group_getObjects '' '{"type": "HostGroup"}' | grep -B4 -A3 '"parentGroupId": null,' | grep ident
Kein Support per DM!
_________________________
opsi support - https://www.uib.de/
For productive opsi installations we recommend support contracts.
_________________________
opsi support - https://www.uib.de/
For productive opsi installations we recommend support contracts.