Issue #22776 has been reported by Marcus Young.
----------------------------------------
Bug #22776: Yum should allow file sources
https://projects.puppetlabs.com/issues/22776
* Author: Marcus Young
* Status: Unreviewed
* Priority: Normal
* Assignee:
* Category:
* Target version:
* Affected Puppet version:
* Keywords: yum, package, source, fileserver, rpm
* Branch:
----------------------------------------
Yum itself allows you to specify a file '# yum install ./myapp.rpm', but the
package resource does not.
Example, If you wanted it to install from Yum or fallback to a file.
I currently get around this by having a fact that searches yum and returns
true|false for the package, then in code:
if (str2bool($::is_marklogic_available)) {
package { 'MarkLogic':
ensure => $version,
provider => yum,
require => [
Package['gdb'],
Package['glibc-devel.i686'],
Package['glibc-devel.x86_64'],
Package['redhat-lsb'],
],
}
} else {
# The MarkLogic files are not available via YUM. Try to fall back on the
Puppet fileserver
file { "/opt/rpms/MarkLogic-${version}.x86_64.rpm":
source => "puppet:///${environment}/MarkLogic-${version}.x86_64.rpm",
}
package { 'MarkLogic':
ensure => $version,
provider => rpm,
require => [
Package['gdb'],
Package['glibc-devel.i686'],
Package['glibc-devel.x86_64'],
Package['redhat-lsb'],
],
source => "/opt/rpms/MarkLogic-${version}.x86_64.rpm",
}
}
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.