What is the preferred module to manage yum repo fi...
# puppet-enterprise
g
What is the preferred module to manage yum repo files on redhat servers? Yum or yumrepo_core?
y
I suspect it depends on who you want supporting it. Perforce or Vox Pupuli.
g
Perforce preferably.
b
yumrepo_core is just a type and provider that was extracted from puppet ages ago
https://forge.puppet.com/modules/puppet/yum/readme is an actual module for managing yum/dnf + repos
g
Is hiera the only way to configure repos in the yum module?
b
no
g
We are trying to transition from a deprecated Example42 module for yum configuration where we used: yum::managed_yumrepo { "${baserepofilename}-baseos_latest": descr => "${basedescr} baseos_latest", baseurl => "${baseurloracle}/baseos_latest/${basearch}", enabled => true, gpgcheck => true, notify => Exec['installera_rpm_gpg'], } What would "yum::managed_yumrepo" translate into for the official yum repo? we can't find in the docs..
I mean generally how does one define the indivual repos?
g
Is there any way to make sure that the repos you define are the only ones present in /etc/yum-repos.d" and not e.g. the default repos provisoned by the base installation? We are using our own mirrors...
Can i just do this?
Copy code
file { '/etc/yum.repos.d/':
  ensure  => 'directory',
  purge   => true, # remove all unmanaged files
  recurse => true,
}