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: 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: Could you tell what it''s wrong on here? Regards.. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/Ei2hPw9axz0J. 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.
Hi Marco, On Fri, Mar 30, 2012 at 12:07 PM, mparrad <marco.parra.d@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.
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.parra.d@gmail.com > <mailto:marco.parra.d@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+unsubscribe@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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi Marco, On Mon, Apr 2, 2012 at 1:17 PM, Marco Parra D. <marco.parra.d@gmail.com>wrote:> 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... >You could rewrite the msi package provider to use the Windows Installer Automation interfaces, which will accurately tell you about the state of installed MSI''s. I have more information here[1]. We''d gladly accept pull requests. Otherwise, it''s something we hope to fix "soon". Josh [1] http://projects.puppetlabs.com/issues/11868#note-6 -- 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.
Hi Josh, I''ll check that link, Thank you again for your help... Regards... On 02-04-2012 18:24, Josh Cooper wrote:> Hi Marco, > > On Mon, Apr 2, 2012 at 1:17 PM, Marco Parra D. > <marco.parra.d@gmail.com <mailto:marco.parra.d@gmail.com>> wrote: > > 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... > > > You could rewrite the msi package provider to use the Windows > Installer Automation interfaces, which will accurately tell you about > the state of installed MSI''s. I have more information here[1]. We''d > gladly accept pull requests. Otherwise, it''s something we hope to fix > "soon". > > Josh > > [1] http://projects.puppetlabs.com/issues/11868#note-6 > > -- > 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.-- 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.