lboynton/puppet-ejabberd — pull request #2 by michael-leroy (2014-03-21 01:19:52+00:00)
Title: Update ejabberdctl.rb to properly handle a user already existing.

In my puppet code I am attempting to add two users.

ejabberd_user { $::fqdn:
host => $::fqdn,
password => 'examplepass',
}
ejabberd_user { "admin":
host => $::fqdn,
password => 'examplepass'
}
The users are added properly but on the next puppet run the following error happens:

Error: Execution of '/usr/sbin/ejabberdctl register admin fakehost.net examplepass' returned 1: User admin@fakehost.net already registered at node ejabberd@fakehost.net

I believe my code fixes this error.