I'm new to puppet and so far I've been doing most of my condition statements using puppet facts which is pretty straightforward. This is what I want to do to make the changes I need. I want to create two groups: nossh with some gid like 100 and another one nosshwpa with gid 101 creating nossh is fine but the problem is some servers already have a group nosshwpass (different group name) with the same gid which serves the same purpose, but to make it consistent with all the other servers, I want to create nosshwpa going forward. So instead of manually changing those first using groupmod or something, I just want to skip over the creation of nosshwpa on those specific servers for now. I'm not really sure how to write a condition statement for this in Puppet. Is there a way to check, for example, is "ensure => present OR ensure => absent" for a given group? So the logic: create nosshwpa IF nosshwpass DOES NOT exist.
I'm not sure if this makes sense. Any input is appreciated. Please let me know if clarification is needed.