If our manifests containing classes and defined types aren't in the right directories, our master won't be able to find them. In the following example, I'm attempting to use a new class:
[root@wordpress puppet]# puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Notice: /File[/opt/puppetlabs/puppet/cache/locales/ja/puppetlabs-ntp.po]/ensure: defined content as '{md5}7265ff57e178feb7a65835f7cf271e2c'
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Could not find class ::profile::baseline::linux for wordpress
(file:/etc/puppetlabs/code/environments/production/modules/profile/manifests/baseline.pp, line: 4, column: 3) on node wordpress
I know that I wrote my linux.pp manifest, but the master can't find it. If I run tree in the directory, I'll see that profile::baseline::linux is actually in the autoload directory for profile::linux. Remember, directories are what provide us with extra layers in our namespace:
profile/
└── manifests
├── baseline.pp # profile::baseline
└── linux.pp # profile::baseline::linux <-- Can't find this
By simply moving my Linux baseline into the baseline folder, the master will be able to find this manifest:
profile/
└── manifests
├── baseline
│ └── linux.pp # profile::baseline::linux <-- Found!
└── baseline.pp # profile::baseline