We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe9bcd1 commit 932696fCopy full SHA for 932696f
pyinfra/facts/server.py
@@ -420,6 +420,9 @@ def command(self):
420
# all groups / users, in which case only the local groups will be returned
421
return "getent group"
422
423
+ def requires_command(self) -> str:
424
+ return "getent"
425
+
426
default = list
427
428
def process(self, output) -> list[str]:
tests/facts/server.Groups/groups.json
@@ -1,5 +1,6 @@
1
{
2
- "command": "cat /etc/group",
+ "command": "getent group",
3
+ "requires_command": "getent",
4
"output": [
5
"lpadmin:x:114:vagrant",
6
"sambashare:x:115:vagrant",
0 commit comments