Essentials Puppet Knowledge Base

Below command-line to execute the puppet.

C:\ProgramData\PuppetLabs\facter>puppet apply –debug –verbose “C:\Mayank_Test\test.pp” > C:\output.txt

Below will ensure it will not do the installation or execution of the script

https://puppetlabs.com/blog/part-2-top-questions-on-puppet-and-windows

http://jackiechen.org/2013/05/07/use-puppet-manage-windows-example-one-run-command/

http://www.copperykeenclaws.com/setting-up-puppet-on-windows/

“C:\Program Files (x86)\Puppet Labs\Puppet Enterprise\bin\puppet.bat” agent -tdv

sample pp file
package { ‘NXLOG-CE’ :
ensure => present,
source => “http://artifactory.ds.adp.com/artifactory/binary-local/nxLog/nxlog-ce-2.8.1248.msi”,
install_options => ‘/q’,
}

service { “nxlog”:
ensure => “running”,
}

file { [‘C:\nxlog’,’C:\nxlog\configuration’]:
ensure => “directory”,
}
file { ‘C:\nxlog\configuration\cvr.nxlog.conf’:
ensure => ‘file’,
source_permissions => ignore,
source => ‘\\C03DFOCVR13\C$\nxlog\configuration\cvr.nxlog.conf’,
}
file { ‘C:\Program Files (x86)\nxlog\conf\nxlog.conf’:
ensure => ‘file’,
source_permissions => ignore,
source => ‘\\C03DFOCVR13\C$\Program Files (x86)\nxlog\conf\nxlog.conf’,
}

Leave a Reply

Your email address will not be published. Required fields are marked *