Book Image

Learning Puppet for Windows Server

By : Fuat Ulugay
Book Image

Learning Puppet for Windows Server

By: Fuat Ulugay

Overview of this book

Table of Contents (15 chapters)
Learning Puppet for Windows Server
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Modules for creating the files and folders


Now, we are starting with our first module definition. The first will be a very easy one. On all the hosts, we will create a file with the content, Hello World!, under the C:\ Windows\Temp> directory.

The Hello World module

To write our first module, we will connect to the Puppet Master with SSH. The working directory for Puppet modules is /etc/puppet/modules. The following is the screenshot of the /etc/puppet directory:

As we can see from the screenshot, the modules folder is owned by the root. Thus, we will switch to the root account to continue working with the modules directory. The following command will give you the root credentials and will also keep you in the directory you are working:

$ sudo -s

If you are not yet at the correct directory, just use the cd command to go to /etc/puppet/modules:

# cd /etc/puppet/modules

Creating the directory structure

The next step is to create our module structure. The most basic one has the following:

  • One...