応答ファイルと共にインストールする必要がある Linux 製品のインストーラーを保存しました。これまでのところ、次のコードがあります。
class installpackage {
file { 'MyInstallerFile':
path => '/tmp/MyInstallerFile',
ensure => present,
owner => 'root',
group => 'root',
mode => '777',
source => 'puppet:///extra_files/MyInstallerFile',
}
file { 'answer_file':
path => '/tmp/answer_file',
ensure => present,
owner => 'root',
group => 'root',
mode => '777',
source => 'puppet:///extra_file/answer_file',
}
exec { "install":
cwd => '/tmp',
command => '/tmp/MyInstallerFile --answer /tmp/answer_file',
logoutput => true,
require => File['MyInstallerFile', 'answer_file'],
}
}
ただし、実行しようとすると、一連のエラーが発生します。
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Caching catalog for puppetagent.example.com
Info: Applying configuration version '1370899438'
Notice: /Stage[main]/Installpackage/Exec[install]/returns: couldn't find HOME environment variable to expand path
Notice: /Stage[main]/Installpackage/Exec[install]/returns: while executing
Notice: /Stage[main]/Installpackage/Exec[install]/returns: "file normalize ~"
Notice: /Stage[main]/Installpackage/Exec[install]/returns: (procedure "::InstallJammer::HomeDir" line 2)
Notice: /Stage[main]/Installpackage/Exec[install]/returns: invoked from within
Notice: /Stage[main]/Installpackage/Exec[install]/returns: "::InstallJammer::HomeDir"
Notice: /Stage[main]/Installpackage/Exec[install]/returns: (procedure "::InstallJammer::CommonInit" line 183)
Notice: /Stage[main]/Installpackage/Exec[install]/returns: invoked from within
Notice: /Stage[main]/Installpackage/Exec[install]/returns: "::InstallJammer::CommonInit"
Notice: /Stage[main]/Installpackage/Exec[install]/returns: (procedure "::InstallJammer::InitInstall" line 19)
Notice: /Stage[main]/Installpackage/Exec[install]/returns: invoked from within
Notice: /Stage[main]/Installpackage/Exec[install]/returns: "::InstallJammer::InitInstall"
Notice: /Stage[main]/Installpackage/Exec[install]/returns: (file "/installkitvfs/main.tcl" line 71313)
Error: /tmp/MyInstallerFile --answer /tmp/answer_file returned 1 instead of one of [0]
Error: /Stage[main]/Installpackage/Exec[install]/returns: change from notrun to 0 failed: MyInstallerFile --answer /tmp/answer_file returned 1 instead of one of [0]
Notice: Finished catalog run in 5.31 seconds
私が間違っているのはどうですか?