summaryrefslogtreecommitdiffstats
path: root/manifests/prerequisites.pp
blob: 082d7d57bf261b1f3f647e87c9a9dd5caf19b059 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# prerequisits for our yum setup
class yum::prerequisites {
  package {
    'yum-priorities' :
      ensure => present,
  }
  if versioncmp($::operatingsystemmajrelease,'5') > 0 {
    Package['yum-priorities']{
      name => 'yum-plugin-priorities'
    }
    package{'deltarpm':
      ensure => present,
      before => Anchor['yum::prerequisites::done'],
    }
    if versioncmp($::operatingsystemmajrelease,'7') < 0 {
      Package['deltarpm']{
        name => 'yum-presto'
      }
    }
  }

  # ensure there are no other repos nor gpg keys
  file {
    ['/etc/pki/rpm-gpg','/etc/yum.repos.d']:
      ensure        => directory,
      recurse       => true,
      purge         => true,
      force         => true,
      require       => Package['yum-priorities'],
      owner         => root,
      group         => 0,
      mode          => '0755';
  } -> anchor{'yum::prerequisites::done': }
}