camptocamp/puppet-tomcat — pull request #77 by jasperla (2014-02-26 19:59:34+00:00)
Title: Ensure $tomcat::home exists before creating a directory below it.

During runs on a Debian machine I consistently run into:

````
Error: Cannot create /usr/share/tomcat6/extras; parent directory /usr/share/tomcat6 does not exist
Error: /Stage[main]/Tomcat::Juli::Debian/File[/usr/share/tomcat6/extras/]/ensure: change from absent to directory failed: Cannot create /usr/share/tomcat6/extras; parent directory /usr/share/tomcat6 does not exist
````

Which seems odd given this code in `install.pp`:
````
package {"tomcat${tomcat::version}":
ensure => present,
} ->
class {'::tomcat::juli': }
````
I'd assume that installing the package creates `tomcat::home`; and re-running the agent after it has failed results in a successful run. Since none of the files in `debian.pp` really need to tomcat package to be installed, perhaps we can just create the directory here and prevent a consistent failure on Debian.