On 09/13/2011 09:47 AM, Tim Coote wrote: > Hullo > I'd like to add the various rpmfusion repos to my puppet manifests. Is > it possible to use yum/rpm to do this directly from the rpmfusion > site, using the downloadable rpm (from the rpmfusion web site): > > yum localinstall --nogpgcheck > http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm > > Otherwise, I've got to define the repo using the yumrepo type, which > just seems like a lot of fragile code (the rpm generates 3 repos). > > tia > Tim >
Tim, I use this define/exec: ## # creates a repo release file by downloading the $source # # $name: name of repository (creates ${name}.repo file) # $source: URL to *-release rpm define packages::repo_release ($source) { exec { $name: command =>"/bin/rpm -Uvh ${source}", creates => "/etc/yum.repos.d/${name}.repo", } } And then I use these instances: packages::repo_release { "rpmfusion-free": source => "http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm", } packages::repo_release { "rpmfusion-nonfree": source => "http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm", } package { [ "rpmfusion-free-release", "rpmfusion-nonfree-release", ]: ensure => latest, require => [ Packages::Repo_release["rpmfusion-free"], Packages::Repo_release["rpmfusion-nonfree"], ], } -Doug
signature.asc
Description: OpenPGP digital signature