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 <mailto: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
    <http://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
    <http://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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

--
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to