-------- Original Message --------
Subject: Re: [Puppet Users] Apply patch once to windows node
From: David Schmitt <[email protected]>
To: [email protected]
Date: 07/21/2014 11:39 AM
On 2014-07-15 15:36, Dhaval Thakar wrote:
Hi All,

I am starting to use puppet to manage windows nodes, tried searching but
couldn't find solution for this...

I need to apply kaspersky patch using puppet to windows nodes. So far I
have used kaspersky server to install / upgrade / patch antivirus.
Trying to get it done using puppet.

Can someone guide me to run windows command on nodes only once ? This
patch does not update installed application version hence couldn't use
Package in manifest file.

Trying to understand your use-case here: What is the problem of using the kaspersky server to deploy the AV patches?

To answer you primary question: If you find a way to programmatically check whether the patch is applied or not, and you know how to install the patch by code, you can implement a exec resource with an onlyif argument to do so. It'll probably be a pain to maintain and will not scale as patches accumulate.


Regards, David

Hi,

Thanks for the reply.
Only valid reason I have is to install patches on fresh OS, along with AV which may not work if I push patches using kasper, kasper admin maintains its local catalogue for app / patch deployment. Also these patches does not change ver number for installed AV. Another reason is to learn puppet.

For now I have created following menifest which works fine on test setup. I am yet to use it for all users. Pl reply if you find any kind of configuration error etc.

class av_patches {
if ! defined(Package["Kaspersky Endpoint Security 10 for Windows"]) {
        package { "Kaspersky Endpoint Security 10 for Windows":
        ensure => installed,
        }
        }
        file { "c:/software/patch_10_1_249.exe":
                ensure => present,
source => "puppet:///modules/av_patches/patch_10_1_249.exe",
        require => Package["Kaspersky Endpoint Security 10 for Windows"],
                }
        file { "c:/software/patch_pfsf2.exe":
                ensure => present,
                source => "puppet:///modules/av_patches/patch_pfsf2.exe",
        require => Package["Kaspersky Endpoint Security 10 for Windows"],
        }
    exec { "patch_10_1_249":
        command => 'c:/software/patch_10_1_249.exe /s',
        creates => "c:/software/patch_10_1_249-installed",
        require => File["c:/software/patch_10_1_249.exe"],
        notify => File["c:/software/patch_10_1_249-installed"],
        }
    file { "c:/software/patch_10_1_249-installed":
                ensure => file,
        require => Exec["patch_10_1_249"],
        }

        exec { "patch_pfsf2":
                command => 'c:/software/patch_pfsf2.exe /s',
                creates => "c:/software/patch_pfsf2-installed",
                require => File["c:/software/patch_pfsf2.exe"],
                notify => File["c:/software/patch_pfsf2-installed"],
                }
        file { "c:/software/patch_pfsf2-installed":
                ensure => file,
                require => Exec["patch_pfsf2"],
                }
}

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/53CCC2BD.40908%40skillneted.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to