If you look at the getting started documentation you are pointed to a Puppet hello world. This was promising but turned out to be more complicated than I had hoped as it was configuring a client and a server.
The installation guide mentioned Puppet Standalone. This sounded like what I wanted but I couldn’t find any other information about installing in this mode.
This isn’t surprising as the documentation is aimed at enterprise use and this wouldn’t be valuable in that context.
Install Standalone puppet
After some trial and error I realised that to install standalone puppet you simply download the puppet agent MSI.
Once installed, we just need to write a script to do something. The simplest thing I could think of is to create a folder and write a file into the new folder.
Hello World Script
content => 'Hello world!',
Save this as MyFirstScript.pp. pp is the extension used for puppet scripts.
The script creates a file called hellowWorld.txt in the c:\HelloWorld folder and adds some content to the file.
Running the script
Now we’re going to check the script is valid and execute the script.
Open a command window and use the puppet command to check the syntax of the script;puppet parser validate MyFirstScript.pp
Now to run this locally at the command line.puppet apply MyfirstScript.pp
You should now be able to navigate to the file to check it’s been created.
This isn’t particularly useful but it shows how to install and run your first script in puppet.