Ask Your Question
0

how to install multiple packages on RHEL 6.2 using puppet

asked 2015-03-13 08:11:53 -0600

YOGESH DANGCHE gravatar image

updated 2015-03-16 05:23:47 -0600

class oracle {

define oracle_packages {

file { "/home/oracle_pkg/${name}":
  ensure => present,
  source => "puppet:///modules/oracle/${name}",
  notify => Package[$name],
}

package { $name:
  ensure          => present,
  provider         => 'rpm',
  allow_virtual    => false,
  source           => "/home/oracle_pkg/${name}",
  require          => File["/home/oracle_pkg/${name}"],
  install_options  => ["rpm -ivh --force=/home/oracle_pkg/"],
}

oraclepackages { 'binutils-2.20.51.0.2-5.28.el6.x8664.rpm': } oraclepackages { 'compat-libcap1-1.10-1.x8664.rpm': }

exec { 'rpm -ivh --force':
  command => "rpm -ivh --force ",
  path    => ["/home/oracle_pkg/"],
}

} I write code like above but it is not work properly.please help me.if anybody try like this please send the demo code.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-03-16 09:15:46 -0600

akshay gravatar image
class class_name {
file {
"/home/directory_name/filename":
ensure => present,
owner => root,
group => root,
mode => 0755,
source => "puppet:///modules/module_name/filename",
notify => Exec["rpm -ivh --force"],
}

exec { "rpm -ivh --force": command => "/bin/rpm -ivh --force /home/directory_name/*.rpm", path => "/usr/sbin:/usr/bin:/sbin:/bin", logoutput => true, refreshonly => true, } } Please try out this code yogesh. Hope this helps...

edit flag offensive delete link more

Comments

thank you very much Akshay.

YOGESH DANGCHE gravatar imageYOGESH DANGCHE ( 2015-03-17 02:16:26 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-03-13 08:11:53 -0600

Seen: 473 times

Last updated: Mar 16 '15