From the course: Learning Puppet (2017)

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Write modules: Test your module

Write modules: Test your module - Puppet Tutorial

From the course: Learning Puppet (2017)

Start my 1-month free trial

Write modules: Test your module

- [Lecturer] Now that the basic module is written let's test it out. First we'll want to wipe out test node so that our module will have something to do. The docker agent module is great for testing because it's really easy to wipe a node. We can just say docker kill minetest.puppet.vm and that's it, our node had been wiped and we can use it to test our puppet module. Let's go back over to get github. So we're going to add a node definition into our site pp. We'll edit the file, and I'm going to add a node definition for a mine test node. Minetest.puppet.vm. And in here I will say include role minecraft_server. Now we still need to define this role and the profiles that go with it. So first I'll commit this file. Go back to the root, then go to site. Go to the role module, and we'll add a file here. This one will be called minecraft_server.pp. Last name should be role::minecraft_server. And in this case we want to include the base profile. Profile base, and the minecraft profile. Then…

Contents