Dear all, I''m trying to write a module, to install a few rpm packages on the agent. This is what I''ve started with: class emi_repo { $emiVer = ''emi-release-1.0.0-1.sl5.noarch.rpm'' package { ''yum-priorities'': ensure => latest; ''yum-protectbase'': ensure => installed; # ''emi-release'': provider => rpm, ensure => installed, source => "puppet:///modules/g_repo/$emiVer", require => Package[ ''yum-priorities'', ''yum-protectbase'' ] } } But it fails with this error: err: /Stage[main]/Xx_emi/Package[emi-release]/ensure: change from absent to present failed: Execution of ''/bin/rpm -i --oldpackage puppet:///modules/g_repo/emi-release-1.0.0-1.sl5.noarch.rpm'' returned 1: error: open of puppet:///modules/g_repo/emi-release-1.0.0-1.sl5.noarch.rpm failed: No such file or directory Why "No such file or directory"? the file: emi- release-1.0.0-1.sl5.noarch.rpm does exist in "/etc/puppet/modules/ g_repo/files/" directory. So, what''s the reason for being failed? Cheers!! -- 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.
On Aug 15, 9:37 am, Sans <r.santanu....@gmail.com> wrote:> err: /Stage[main]/Xx_emi/Package[emi-release]/ensure: change from > absent to present failed: Execution of ''/bin/rpm -i --oldpackage > puppet:///modules/g_repo/emi-release-1.0.0-1.sl5.noarch.rpm'' returned > 1: error: open of puppet:///modules/g_repo/emi-release-1.0.0-1.sl5.noarch.rpm > failed: No such file or directory > > Why "No such file or directory"? the file: emi- > release-1.0.0-1.sl5.noarch.rpm does exist in "/etc/puppet/modules/ > g_repo/files/" directory. So, what''s the reason for being failed?Typically, the puppetmaster daemon runs as a non-root user, often one named ''puppet''. That user must have sufficient privilege to traverse the directory structure under /etc/puppet and to read all the files in it. In all likelihood, the file in question or one of the directories in its path is not readable to that user, or possibly one of the directories in the path is not traversible by him. John -- 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.
Or, even more likely, Puppet is passing the file URL to RPM. RPM does not understand the puppet: URL scheme. Note the Puppet documentation for this property, which explicitly says "This must be a [path ...] or a URL that your specific packaging type understands; Puppet will not retrieve [the package file] for you." I''d recommend setting up your own local Yum repository, and serving the RPM from that. Use the Yumrepo resource to manage the definition of your local repository. You could also set up the "emi-release" repository via Yumrepo, if you wanted to do, but that would not perform tasks such as installing GPG keys, and you would not be able to use Yum / RPM to remove it again. John -- 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.