実行可能ファイルのサイレント インストールを行う Windows ローカル マシンでパペット マニフェストを作成/テストしようとしています。私は 1 台のマシンでしかテストしていないので、puppet apply を使用します。これが私のパペットファイルです:
class particularnsbservice{
$pkg = 'Particular.NServiceBus-4.0.2.exe'
file { $pkg:
ensure => present,
name => "C:\\Temp\\${pkg}",
source => "puppet:///puppetfs/${pkg}",
mode => '0755',
before => Exec['install_nsbus'],
}
exec { 'install_nsbus':
command => "C:\\Temp\\${pkg} /q /l C:\\Temp\\${pkg}.log",
creates => 'C:\Program Files (x86)\ParticularNSBServicecular.NServiceBus\bin',
logoutput => true,
}
}
マニフェストを適用した後に生成されるログは次のとおりです。
Wed Sep 11 11:32:54 -0400 2013 Puppet (info): Loading facts in C:/ProgramData/PuppetLabs/puppet/etc/modules/admin/lib/facter/user_name.rb
Wed Sep 11 11:32:54 -0400 2013 Puppet (info): Loading facts in C:/ProgramData/PuppetLabs/puppet/etc/modules/teamcityagent/lib/facter/short_host.rb
Wed Sep 11 11:32:54 -0400 2013 Puppet (info): Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/concat_basedir.rb
Wed Sep 11 11:32:54 -0400 2013 Puppet (info): Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/custom_auth_conf.rb
Wed Sep 11 11:32:54 -0400 2013 Puppet (info): Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/facter_dot_d.rb
Wed Sep 11 11:32:54 -0400 2013 Puppet (info): Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/pe_version.rb
Wed Sep 11 11:32:54 -0400 2013 Puppet (info): Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/puppet_vardir.rb
Wed Sep 11 11:32:54 -0400 2013 Puppet (info): Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/root_home.rb
Wed Sep 11 11:32:54 -0400 2013 Puppet (info): Loading facts in C:/ProgramData/PuppetLabs/puppet/var/lib/facter/user_name.rb
Wed Sep 11 11:33:02 -0400 2013 Puppet (debug): Creating default schedules
Wed Sep 11 11:33:02 -0400 2013 Puppet (debug): Finishing transaction 131507484
Wed Sep 11 11:33:02 -0400 2013 Puppet (debug): Failed to load library 'selinux' for feature 'selinux'
Wed Sep 11 11:33:02 -0400 2013 Puppet (debug): Puppet::Type::File::ProviderPosix: feature posix is missing
Wed Sep 11 11:33:03 -0400 2013 Puppet (debug): Failed to load library 'shadow' for feature 'libshadow'
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/clientbucket] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/log] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/facts] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs/lt70121.va.nreca.org.pem] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/lib] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/state/classes.txt] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var/state]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/state/graphs] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var/state]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/state/state.yaml] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var/state]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/state] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/run] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys/lt70121.va.nreca.org.pem] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/crl.pem] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certificate_requests] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/state/resources.txt] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var/state]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs/ca.pem] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys/lt70121.va.nreca.org.pem] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_report.yaml] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var/state]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/client_data] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/state/last_run_summary.yaml] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var/state]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc]
Wed Sep 11 11:33:03 -0400 2013 /File[C:/ProgramData/PuppetLabs/puppet/var/client_yaml] (debug): Autorequiring File[C:/ProgramData/PuppetLabs/puppet/var]
Wed Sep 11 11:33:03 -0400 2013 Puppet (debug): Finishing transaction 39997452
Wed Sep 11 11:33:03 -0400 2013 Puppet (debug): Loaded state in 0.02 seconds
Wed Sep 11 11:33:03 -0400 2013 Puppet (debug): Loaded state in 0.01 seconds
Wed Sep 11 11:33:03 -0400 2013 Puppet (info): Applying configuration version '1378913582'
Wed Sep 11 11:33:03 -0400 2013 /Schedule[daily] (debug): Skipping device resources because running on a host
Wed Sep 11 11:33:03 -0400 2013 /Schedule[monthly] (debug): Skipping device resources because running on a host
Wed Sep 11 11:33:03 -0400 2013 /Schedule[hourly] (debug): Skipping device resources because running on a host
Wed Sep 11 11:33:03 -0400 2013 /Schedule[never] (debug): Skipping device resources because running on a host
Wed Sep 11 11:33:03 -0400 2013 /Schedule[weekly] (debug): Skipping device resources because running on a host
Wed Sep 11 11:33:03 -0400 2013 /Schedule[puppet] (debug): Skipping device resources because running on a host
Wed Sep 11 11:33:03 -0400 2013 Puppet (debug): Finishing transaction 40823628
Wed Sep 11 11:33:03 -0400 2013 Puppet (debug): Storing state
Wed Sep 11 11:33:03 -0400 2013 Puppet (debug): Stored state in 0.04 seconds
Wed Sep 11 11:33:03 -0400 2013 Puppet (notice): Finished catalog run in 0.15 seconds
Wed Sep 11 11:33:03 -0400 2013 Puppet (debug): Finishing transaction 39987792
Wed Sep 11 11:33:03 -0400 2013 Puppet (debug): Received report to process from [server name redacted]
Wed Sep 11 11:33:03 -0400 2013 Puppet (debug): Processing report from [server name redacted] with processor Puppet::Reports::Store
適用の最後に、次のエラーが表示されます。
Could not retrieve short_host: undefined method `[]' for nil:NilClass
私はいくつかの調査を行いましたが、このエラーは通常、クラスのどこかで書かれた間違いを指していますが、パペットパーサーの検証とレーキリントの両方が私のマニフェストにエラーを見つけませんでした. ここでのエラーは何でしょうか?
前もって感謝します!