Looks to me like the module/manifests/init.pp files should be broken up.
Today, they're monolithic, and hold all the class and subclass definitions for a module.
Puppet looks at all the *.pp files for a module under manifests/. The suggested structure for this directory is that each subclass be defined in its own manifest, so that foo/manifests/init.pp defines class foo, foo/manifests/bar.pp defines class foo::bar and foo/manifests/mumble/frabitz.pp defines class foo::mumble::frabitz .
The refactor-init script in github:jsh/fedora-infrastructure creates this structure from an existing init.pp. (My guess is it's still too simple-minded and incomplete, but it's a start.)
Unit tests are supposed to mirror this structure, and mk-manifest-unit-tests, also on GitHub, does this job.
No comments:
Post a Comment