puppetlabs / control-repo

A control repository template
Apache License 2.0
204 stars 510 forks source link

More details for version constraints in the Puppetfile? #117

Open fr3nch13 opened 1 month ago

fr3nch13 commented 1 month ago

(adding here for the future googler) It doesn't mention in the documentation at either allowed or not. For the Puppetfile in control-repos, can you define version constraints other than the exact version number?

Like, instead of

mod 'puppetlabs-reboot', '2.0.0'

Can we do something like these?

mod 'puppetlabs-reboot', '~2.0'
mod 'puppetlabs-reboot', '>=2.0.0 <3'
mod 'puppetlabs-reboot', '2.*'

Similar to how Composer describes it at: https://getcomposer.org/doc/articles/versions.md

Can the documentation be updated to be more clear if version ranges are allowed or not? Here at step 2: https://www.puppet.com/docs/puppet/7/puppetfile_usage.html#declare_puppet_forge_modules_in_the_puppetfile