Master and apply command use codedir, but not the agent. It is the primary repository for data and code that uses an environment with manifests and modules. It includes a global module directory and Hiera data and configuration.  This codedir is in the local directories below:  For Windows: C:ProgramDataPuppetLabspuppetet cetera  Linux : /etc/dir/PuppetLabs/code