0

Is there a more-elegant method for getting users (in a given group) in chef than iterating over etc/passwd? I suppose I could use search functionality to get the list of group members from data bags.

StephenKing
  • 36,187
  • 11
  • 83
  • 112
Skarab
  • 6,981
  • 13
  • 48
  • 86

1 Answers1

1

Yes, ohai gives you such information. You can access these automatic attributes like any other attribute.

You find information about the groups in node[:etc][:group]

StephenKing
  • 36,187
  • 11
  • 83
  • 112