Received: by 10.100.77.1 with SMTP id z1mr3729708ana.5.1333397927493; Mon, 02 Apr 2012 13:18:47 -0700 (PDT) X-BeenThere: puppet-users@googlegroups.com Received: by 10.236.121.36 with SMTP id q24ls8393476yhh.4.gmail; Mon, 02 Apr 2012 13:18:39 -0700 (PDT) Received: by 10.101.129.33 with SMTP id g33mr3694606ann.25.1333397919385; Mon, 02 Apr 2012 13:18:39 -0700 (PDT) Received: by 10.101.129.33 with SMTP id g33mr3694605ann.25.1333397919359; Mon, 02 Apr 2012 13:18:39 -0700 (PDT) Return-Path: Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.213.177]) by gmr-mx.google.com with ESMTPS id g49si12036989yhe.6.2012.04.02.13.18.39 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 02 Apr 2012 13:18:39 -0700 (PDT) Received-SPF: pass (google.com: domain of marco.parr...@gmail.com designates 209.85.213.177 as permitted sender) client-ip=209.85.213.177; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of marco.parr...@gmail.com designates 209.85.213.177 as permitted sender) smtp.mail=marco.parr...@gmail.com; dkim=pass header...@gmail.com Received: by yenm10 with SMTP id m10so1750206yen.22 for ; Mon, 02 Apr 2012 13:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=G15uXHrg/QpNtSjQmO3x16xAwyioRRiMXdEwfPzZECc=; b=gSsj2l723eJDhDU0Dj9pzO+WzMqw9Xjv6bsClp7Xbikkl1FVA8tuzom/j5Ls1dVmcb w8wXdBobdUKIFFALZLtQBYr7KNfSNvEvGHq5HpoGazvEnmIOiCOD2isvhfyafjCTd9pt Rd85vpvR76o2PgzMpuZ1NRmwbnMJcvwJIkUAbkUL4GlqlJ3Eod9l0AvMsIh4Mg5WiZ6J HjF1e8pMipWM3ykyvvKoHhFxvcHV/4MPj1SnhsDOO/UmfDHHmlTVUsEMIiaMv5cz+wVH Gs8HuoCK71rszjTdkRbjkOJnOQfwqSYH/RstOhKnFV57j9HDY1xmn4nSKDEYsaeTzV5r 8nOg== Received: by 10.236.181.5 with SMTP id k5mr8451595yhm.61.1333397919229; Mon, 02 Apr 2012 13:18:39 -0700 (PDT) Return-Path: Received: from [10.24.2.100] ([200.111.183.123]) by mx.google.com with ESMTPS id i7sm24383039ani.17.2012.04.02.13.18.36 (version=SSLv3 cipher=OTHER); Mon, 02 Apr 2012 13:18:38 -0700 (PDT) Message-ID: <4F7A0977.7070...@gmail.com> Date: Mon, 02 Apr 2012 17:17:59 -0300 From: "Marco Parra D." User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: puppet-users@googlegroups.com Subject: Re: [Puppet Users] Issue with puppet windows References: <13078768.305.1333134434179.JavaMail.geo-discussion-forums@vbyw15> In-Reply-To: Content-Type: multipart/alternative; boundary="------------080003030009010008070504" This is a multi-part message in MIME format. --------------080003030009010008070504 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit HI Josh, The program was uninstalled using Add /remove Feature, I found the file C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\Universal Forwarder.yml on the windows agent side, when I removed the puppet agent install again the package perfect... / /I'm thinking in the case that a user by error removes the application or package from the box, I testing If puppet can reinstall if the package is missing... Is it possible do something like that using puppet?... or I must use another way to fix possible "uninstall" from users?... Thank you again for your help... On 02-04-2012 15:30, Josh Cooper wrote: > Hi Marco, > > On Fri, Mar 30, 2012 at 12:07 PM, mparrad > wrote: > > Hi guys, I'm trying to create my module to install splunk > forwarder on windows boxes, I have this init.pp file on my module > manifests: > > class splunk-mp() > { > > file {'D:\Install': > ensure => directory, > mode => 0777, > } > > file {'D:\Install\Apps': > ensure => directory, > mode => 0777, > source => 'puppet:///modules/splunk-mp/Apps', > recurse => true, > } > > package {"Universal Forwarder": > source => > "d:\\Install\\Apps\\splunkforwarder-4.3-115073-x64-release.msi", > ensure => installed, > install_options => { > "AGREETOLICENSE" => 'Yes', > "RECEIVING_INDEXER" => "192.168.10.13:9997 > ", > "LAUNCHSPLUNK" => "1", > "SERVICESTARTTYPE" => "auto", > "WINEVENTLOG_APP_ENABLE" => "1", > "WINEVENTLOG_SEC_ENABLE" => "1", > "WINEVENTLOG_SYS_ENABLE" => "1", > "WINEVENTLOG_FWD_ENABLE" => "1", > "WINEVENTLOG_SET_ENABLE" => "1", > "ENABLEADMON" => "1", > }, > require => File['D:\Install\Apps'], > } > > service {"SplunkForwarder": > ensure => running, > enable => true, > require => Package['Universal Forwarder'], > } > } > > This works fine the first time, and then never again works, I'm > thinking the case somebody by error uninstall splunk forwarder on > the windows box. > > the second time after I uninstalled splunk forwarder and run > puppet agent again, I got this message: > > > Did you uninstall splunk forwarder through add/remove programs? If so, > then this is https://projects.puppetlabs.com/issues/11868. Puppet > doesn't know if the program is uninstalled out from underneath it. > > C:\Users\Administrator>puppet agent --test > notice: Ignoring --listen on onetime run > info: Retrieving plugin > info: Caching catalog for cscltest01.office.com > > info: Applying configuration version '1333133419' > err: /Stage[main]/Splunk-mp/Service[SplunkForwarder]: Could not > evaluate: Cannot get status of SplunkForwarder, error was: The > specified service does not exist as an installed service. > notice: Finished catalog run in 2.05 seconds > notice: > /File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content: > > > If this wasn't removed through add/remove programs, can you run with > --test --debug --trace? > > Thanks, > Josh > -- > Josh Cooper > Developer, Puppet Labs > > -- > You received this message because you are subscribed to the Google > Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. --------------080003030009010008070504 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit HI Josh,

The program was uninstalled using Add /remove Feature, I found the file C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\Universal Forwarder.yml on the windows agent side, when I removed the puppet agent install again the package perfect...

I'm thinking in the case that a user by error removes the application or package from the box, I testing If puppet can reinstall if the package is missing...  Is it possible do something like that using puppet?... or I must use another way to fix possible "uninstall" from users?...

Thank you again for your help...

On 02-04-2012 15:30, Josh Cooper wrote:
Hi Marco,

On Fri, Mar 30, 2012 at 12:07 PM, mparrad <marco.parr...@gmail.com> wrote:
Hi guys, I'm trying to create my module to install splunk forwarder on windows boxes, I have this init.pp file on my module manifests:

class splunk-mp()
{

file {'D:\Install':
        ensure => directory,
        mode => 0777,
        }

file {'D:\Install\Apps':
        ensure => directory,
        mode => 0777,
        source => 'puppet:///modules/splunk-mp/Apps',
        recurse => true,
        }

package {"Universal Forwarder":
    source => "d:\\Install\\Apps\\splunkforwarder-4.3-115073-x64-release.msi",
    ensure => installed,
    install_options => {
        "AGREETOLICENSE"         => 'Yes',
        "RECEIVING_INDEXER"      => "192.168.10.13:9997",
        "LAUNCHSPLUNK"           => "1",
        "SERVICESTARTTYPE"       => "auto",
        "WINEVENTLOG_APP_ENABLE" => "1",
        "WINEVENTLOG_SEC_ENABLE" => "1",
        "WINEVENTLOG_SYS_ENABLE" => "1",
        "WINEVENTLOG_FWD_ENABLE" => "1",
        "WINEVENTLOG_SET_ENABLE" => "1",
        "ENABLEADMON"            => "1",
        },
    require => File['D:\Install\Apps'],
    }

  service {"SplunkForwarder":
    ensure  => running,
    enable  => true,
    require => Package['Universal Forwarder'],
  }
}

This works fine the first time, and then never again works, I'm thinking the case somebody by error uninstall splunk forwarder on the windows box.

the second time after I uninstalled splunk forwarder and run puppet agent again, I got this message:

Did you uninstall splunk forwarder through add/remove programs? If so, then this is https://projects.puppetlabs.com/issues/11868. Puppet doesn't know if the program is uninstalled out from underneath it.

C:\Users\Administrator>puppet agent --test
notice: Ignoring --listen on onetime run
info: Retrieving plugin
info: Caching catalog for cscltest01.office.com
info: Applying configuration version '1333133419'
err: /Stage[main]/Splunk-mp/Service[SplunkForwarder]: Could not evaluate: Cannot get status of SplunkForwarder, error was: The specified service does not exist as an installed service.
notice: Finished catalog run in 2.05 seconds
notice: /File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml]/content:

If this wasn't removed through add/remove programs, can you run with --test --debug --trace?

Thanks,
Josh
--
Josh Cooper
Developer, Puppet Labs

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

--------------080003030009010008070504--