cotdsa/windows-puppet-example — pull request #1 by sdliangzhihua (2014-02-25 14:26:29+00:00)
Title: Elvis Liang modified on 26/02/2014

Hi Ash,

I modified your manifests.pp files and made the following changes.

1. Removed the notify from the code.
2. I manually downloaded the latest version of Notepad++ to "C:\Users\Administrator\Desktop\Puppet".
3. Added code to install the Notepad++ version 6.5.4 to the windows host.
4. Added code to add a new user "elvis", give the user a password "E1v!s@c0td" and make sure the user is present all the time.
5. Added code to ensure the "puppet" service is in a "Stopped" state.
6. Added code to create a new batch file "C:\Users\Administrator\Desktop\Puppet\LogDate.bat", which will write date to file "c:\date.txt".
7. Added code to create a new batch file "C:\Users\Administrator\Desktop\Puppet\CreateSchedTask.bat", which uses to setup the schedule task to run "LogDate.bat" every 5 minutes. I have to use this method as the Puppet's scheduled_task method does not support running a schedule every 5 minutes.
8. Added code to run "C:\Users\Administrator\Desktop\Puppet\CreateSchedTask.bat" for seting up the schedule task "LogDateTask". This schedule task will run "LogDate.bat" every 5 minutes to write date to the file "c:\date.txt".
9. The new file "C:\Users\Administrator\Desktop\Puppet\LogDate.bat" need to be created before the file "C:\Users\Administrator\Desktop\Puppet\CreateSchedTask.bat". Just because I want to make sure both files are created before setting up the schedule task.
10.The batch file "C:\Users\Administrator\Desktop\Puppet\CreateSchedTask.bat" need to run after the file "C:\Users\Administrator\Desktop\Puppet\CreateSchedTask.bat" has been created. And it need to be run again if the file "CreateSchedTask.bat" is changed at any time.

That's all what I have changed.

Cheers

Elvis