How to deploy MSI Packages with puppet on Windows 2012 Server?

asked 2017-05-30 04:46:15 -0600

tuxload gravatar image

Hello,

we would like to deploy check_MK Packages. This is working fine on Windows7 with the following script:

# Windows only
    if $::kernel == 'windows' {

            file { "C:\\check-mk-agent_${version}_all.msi":
            ensure => present,
            source => "puppet:///modules/admin/check-mk-agent_${version}_all.msi",
                    notify => Package["Check_MK Agent"],
        }

            package { "Check_MK Agent":
                    ensure          => installed,
                    source          => 'C:\check_mk_agent.msi',
                    require                 => File["C:\\check-mk-agent_${version}_all.msi"],
                    install_options => [ { 'INSTALLDIR' => 'C:\check_mk' } ]
            }

            file { "C:\\check_mk\\check_mk.ini":
        ensure => present,
        content => template('admin/check_mk_agent_windows.erb'),
        notify   => Service["check-mk-windows-service"],
        require => Package["Check_MK Agent"]
    }

            service { 'check-mk-windows-service':
        name    => "Check_MK_Agent",
        ensure  => running,
        enable  => true,
        require => Package["Check_MK Agent"]
    }
    }

But i get alway the that be ensure that it is an real msi and that you have the right permission on the file. Is there a special securty flag in windows that i'am able to execute over puppet?

Thanks

edit retag flag offensive close merge delete