Skip to content

Instantly share code, notes, and snippets.

@flyinprogrammer
Created December 3, 2015 23:23
Show Gist options
  • Save flyinprogrammer/a3fac83750e8109b26ce to your computer and use it in GitHub Desktop.
Save flyinprogrammer/a3fac83750e8109b26ce to your computer and use it in GitHub Desktop.
if manage_repo
yumrepo {'repo':
enabled => 1,
gpgcheck => 1,
}
end
package { 'package':
ensure => latest,
if Yumrepo['repo'] was defined:
require => Yumrepo['repo'],
end
}
@ripienaar
Copy link

if manage_repo
   yumrepo{ ....}

   # its called 'setting defaults' in the docs
   Package { require => Yumrepo[...]}
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment