Giter VIP home page Giter VIP logo

puppet-yum's Introduction

Puppet yum module

This module provides helpful definitions for dealing with yum.

Requirements

Module has been tested on:

  • Puppet 3.x
  • CentOS 6, 7

Usage

yum

Manage main Yum configuration.

class { 'yum':
  keepcache         => false|true,
  debuglevel        => number,
  exactarch         => false|true,
  obsoletes         => false|true,
  gpgcheck          => false|true,
  installonly_limit => number,
  keep_kernel_devel => false|true,
}

If installonly_limit is changed, purging of old kernel packages is triggered.

yum::config

Manage yum.conf.

yum::config { 'installonly_limit':
  ensure => 2,
}

yum::config { 'debuglevel':
  ensure => absent,
}

yum::gpgkey

Import/remove GPG RPM signing key.

Key defined in recipe (inline):

yum::gpgkey { '/etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-smoketest1':
  ensure  => present,
  content => '-----BEGIN PGP PUBLIC KEY BLOCK-----
...
-----END PGP PUBLIC KEY BLOCK-----',
}

Key stored on Puppet fileserver:

yum::gpgkey { '/etc/pki/rpm-gpg/RPM-GPG-KEY-elrepo.org':
  ensure => present,
  source => 'puppet:///modules/elrepo/RPM-GPG-KEY-elrepo.org',
}

yum::plugin

Install or remove yum plugin:

yum::plugin { 'versionlock':
  ensure => present,
}

yum::versionlock

Locks explicitly specified packages from updates. Package name must be precisely specified in format EPOCH:NAME-VERSION-RELEASE.ARCH. Wild card in package name is allowed or automatically appended, but be careful and always first check on target machine if your package is matched correctly! Following definitions create same configuration lines:

yum::versionlock { '0:bash-4.1.2-9.el6_2.*':
  ensure => present,
}

yum::versionlock { '0:bash-4.1.2-9.el6_2.':
  ensure => present,
}

Correct name for installed package can be easily get by running e.g.:

$ rpm -q bash --qf '%|EPOCH?{%{EPOCH}}:{0}|:%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n'
0:bash-4.2.45-5.el7_0.4.x86_64

yum::group

Install or remove yum package group:

yum::group { 'X Window System':
  ensure  => present,
  timeout => 600,
}

yum::install

Install or remove packages via yum install subcommand:

From URL:

yum::install { 'package-name':
  ensure => present,
  source => 'http://path/to/package/filename.rpm',
}

From local filesystem:

yum::install { 'package-name':
  ensure => present,
  source => '/path/to/package/filename.rpm',
}

Please note that resource name must be same as installed package name.

Contributors


CERIT Scientific Cloud, [email protected]

puppet-yum's People

Contributors

bastelfreak avatar jyaworski avatar vholer avatar jskarpe avatar igalic avatar johnzimm avatar jpoittevin avatar lklimek avatar mmckinst avatar nibalizer avatar treydock avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.