# This is the basic structure for a Windows project puppet module at Softek # We found that the Package type as provided by Puppet was not quite sufficient for our needs. # Instead, we transfer the file, exec msiexec when it changes (while logging install output), and then ensure the service is running. class some_project { $installer = 'Project.Setup.msi' $url = "puppet:///release/${installer}" file { "c:/packages/${installer}": ensure => 'file', mode => '1777', owner => 'administrator', group => 'Administrators', source => $url, } exec { 'Package Project': path => "c:\\windows\\system32", command => "msiexec /qn /norestart /i c:\\packages\\${installer} /l*v c:\\packages\\${installer}.log", refreshonly => true, subscribe => File["c:/packages/${installer}"], require => [ Class['other_project'], Class['another_project'], ], } service { 'project.service': ensure => running, require => Exec['Package Project'], subscribe => [ Env['PROJECT_CONFIGURATION'], # custom Env type for defining environment variables ], } }