Simple docker setup for testing puppet modules
docker compose up -d
# Daemon that executes the agent every 15s
./run_puppet_agent.sh
Puppet module dependencies should be added to the Puppetfile
. Modules will be installed when you launch the ./run_puppet_agent.sh
daemon.
- The
./modules
directory is the source for all custom puppet modules.- These are mapped into
/etc/puppetlabs/code/modules
in the puppet container. - Modules installed via the
Puppetfile
are installed in/etc/puppetlabs/code/environments/production/modules
- These are mapped into
- Changes made are reflected instantly.
modules
└── my_module
├── data
│ └── common.yaml
├── files
│ └── sample.json
├── hiera.yaml
├── lib
│ ├── facter
│ └── puppet
├── manifests
│ ├── file_loop.pp
│ └── init.pp
└── templates
└── sample_template.json.epp
The entrypoint(site.pp
) contains
our custom modules, therefore executing them.
- The
manifests
directory is mapped into/etc/puppetlabs/code/environments/production/manifests
in the puppet container.
manifests
└── site.pp