Describe your issue in as much detail as possible...
Zendesk Issue: https://puppetlabs.zendesk.com/agent/tickets/24305
Module doesn't configure multiple realms, but instead configures one realm with one statement, then overwrites that realm with the other realm.
Looking at the tomcat module in manifests/config/server/realm.pp on line 97, it looks like it's still referring to each class name as a unique asset, which gets passed on to Augeas.
By comparison, if you use augtool, you can add multiple classnames just by appending a number to the end of the classname.
It would seem then, that the number of duplicate realms would need to be counted, and then each element passed on to Augeas with that number, like an element ID so that it doesn't stomp on the others.
The customer has a server.xml with two realms configured, and has gone into augtool and did a print so you can see how it looks in Augeas (puppet_tomcat_augeas_working.txt).
Compare that to the Augeas output after running this through the Tomcat module as configured in the manifest and the Augeas output (puppet_tomcat_augeas_fail.txt), and you'll see that even though it's accepting both realms now, it's still only passing the classname once back to Augeas.
When running Puppet (puppet_run_output.txt), you see that it's dropping in the first realm properly, then going back and editing that realm with the second realm, rather than configuring two unique elements.
Module should support configuring multiple LDAP realms.
Initial LDAP realm is overwritten by second configured realm.