tools.pp 787 Bytes
Newer Older
Markus Frosch's avatar
Markus Frosch committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
class icinga_admin::tools
{
  Package {
    ensure => present,
  }

  ensure_packages(
    [
      'bash-completion',
      'screen',
      'sysstat',
      'curl',
      'htop',
    ]
  )

17 18 19 20 21
  if $::osfamily == 'RedHat' {
    ensure_packages(['epel-release'])
    Package['epel-release'] -> Package['htop']
  }

Markus Frosch's avatar
Markus Frosch committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
  # VIM START
  $_vim_package = $::osfamily ? {
    'RedHat' => 'vim-enhanced',
    default  => 'vim',
  }

  ensure_packages([$_vim_package])

  if $::osfamily == 'Debian' {
    alternatives { 'editor':
      path    => '/usr/bin/vim.basic',
      require => Package['vim'],
    }
  }
  # VIM END

  # LOCATE START
  $_mlocate_package = $::osfamily ? {
    'Suse'  => 'findutils-locate',
    default => 'mlocate',
  }

  ensure_packages([$_mlocate_package])
  # LOCATE END
}