O'Reilly logo

Learning Puppet for Windows Server by Fuat Ulugay

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Uploading files

If you have a very long text file or a binary file, it really does not make sense to use the content option. In this case, we will directly refer to the file and it will be uploaded. Later, if we make any changes in our file in the server, this change will be also applied to all the hosts.

Here is the definition:

file { 'path and name of file':
source => 'puppet:///modules/modulename/filename',
}

We will, again, use the hello.txt file, but this time we will create the details under our module. For this purpose, create the files folder under the helloworld module. After this, create the hello.txt file under the files folder.

The module structure is as shown in the following screenshot, and we can also see the contents of the hello.txt ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required