I need to install a jenkins on a server using a user jenkinsuser and group jenkinsgroup. so in my recipe I defined as

group jenkinsgroup do
  system true
# creates user
user jenkinsuser do
  gid jenkinsgroup
  system true

but what will happen if the user and group exist already in node (where I am trying to install jenkins) Does my resource do nothing as a user and group exists and go for next steps or will it throw an error as user exists?

  • 2
    Why don't you try it? Wouldn't have taken longer than writing this, right? Commented May 19, 2017 at 16:49
  • 2
    With chef, you define the desired state (e.g. a group exists). Therefore, it does nothing, if the system is already in the desired state. Commented May 19, 2017 at 16:50

1 Answer 1


It does nothing. A huge part of the purpose of Chef is that converges are idempotent, meaning you can run them repeatedly with no cumulative effects. I highly recommend consulting the Chef documentation as it will provide an excellent foundation for understanding how and why Chef works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.