Hi,
There's currently no official document that describes files and
directories that are allowed or required within a released puppet
module. After some discussion on IRC and slack I went ahead and created a
draft for such a document:
https://github.com/puppetlabs/puppet-specifications/pull/157Why is this important?
Some
puppetservers have quite a few environments with many modules.
Especially in Puppet Enterprise, where modules are first downloaded to
the primary and then distributed to all compilers, useless files in a
module really increase the deployment time and this grows with each
module and with each environment.
r10k recently got the
--exclude-spec option so it won't deploy the /spec/ dir. This already
helps but there are still many useless files deployed. Vox Pupuli tries
to reduce this with a quite complex .pmtignore file:
https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.pmtignore.erbThe
file is read during the module creation and acts like a .gitignore. All
files exlcuded in the .pmtignore won't be in the module release. But
such a denylist won't catch all files. It's a never ending story to
update it. And it's only useful for releases published to the forge. If
r10k/code-manager gets a specific commit or git tag from GitHub, the
.pmtignore isn't used and we need to rely on --exclude-spec.
To
improve the situation, we want to switch from a denylist to an
allowlist. We want to update the .pmtignore file to only explicitly
allow files that are required for a released module. This will shrink
the module and reduce required disk space on the forge. In addition we
want to update r10k to work with this allowlist.
But to do this,
we need an official document that lists what's actually allowed/required
in a module. Hence the PR in puppet-specifications.
If you've opinions on this, please respond in the PR.
Cheers,
Tim Meusel