puppetlabs-tomcat icon indicating copy to clipboard operation
puppetlabs-tomcat copied to clipboard

`war_source` can(not) be a local path

Open bencomp opened this issue 9 months ago • 1 comments

I'm trying to install a WAR file using a custom resource that wraps tomcat::war.

Describe the Change You Would Like

The @param description for the war_source parameter says:

Valid options: a string containing a puppet://, http(s)://, or ftp:// URL.

However, the README says

The war_source can be a local path or a puppet:///, http://, or ftp:// URL.

I would like these explanations to be the same (and correct, of course), so that I can understand whether a local path as war_source is a valid option. As far as I can tell, the code does not actually require URLs, but I am not sure that I understand it enough to trust my judgment. Also note the different number of /s in the puppet: URLs.

bencomp avatar Feb 18 '25 13:02 bencomp

This class uses the archive module. This module supports the following values: archive file source, supports puppet|http|https|ftp|file|s3|gs uri.

The documentation for this is here: https://github.com/voxpupuli/puppet-archive/blob/master/REFERENCE.md#source

For reference here is the code where this is used: https://github.com/puppetlabs/puppetlabs-tomcat/blob/main/manifests/war.pp#L83-L88

So you definitely should be able to use a local file path as the source. The readme of the archive module has an example: https://github.com/voxpupuli/puppet-archive/tree/master?tab=readme-ov-file#network-files

hth

moritzdietz avatar Mar 05 '25 14:03 moritzdietz