[Puppet Users] Re: ensure tomcat - duplicated definition

2014-04-24 Thread jcbollinger
On Wednesday, April 23, 2014 12:43:24 PM UTC-5, Björn Becker wrote: > > I guess that my module isn't best practice: > > Actually, yes, it's pretty bad. My apologies for being blunt. Specifically, 1. You are polluting the global namespace with your defined-type names. 2. Each manifest f

[Puppet Users] Re: ensure tomcat - duplicated definition

2014-04-24 Thread Björn Becker
Unfortunataly I'm not able to establish the dependency: define ensure_tomcats($tc_name, $tc_path, $version) { include tomcat::download download_tomcat{"tomcat $version": version => $version;} file{"$tc_path": ensure => present, owner => $tc_name, group => "app",

[Puppet Users] Re: ensure tomcat - duplicated definition

2014-04-24 Thread William Leese
Wouldn't it be easier to turn: file{"download apache-tomcat-$version" ...} into an Exec (curl/wget) with an unless parameter? or more like your original design, but limited: turn "define download" into a class that installs only a single version (maybe a separate class per major version, and j