LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-18-2011, 11:54 AM   #1
smilemukul
Member
 
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292

Rep: Reputation: 34
Problem with Puppet manifest code


Hi,
I want to install linux-headers according to the kernels installed in the clients systems as there will be either "2.6.38-11-generic" or "2.6.38-11-generic-pae" kernel will exist in the client systems
so my requirement is that I want to install linux-headers as per the kernel below,

2.6.38-11-generic -----> linux-headers-2.6.38-11-generic
or
2.6.38-11-generic-pae ----> linux-headers-2.6.38-11-generic-pae

I written a manifest code as shown but only first kernel is getting install errespective of the kernel & not accepting the else statement as,

###############################################################

$kernel_version = "2.6.38-11-generic"
if $kernel_version == "$kernelrelease"
{
file { '"${kernelrelease}"/build':
path => '/lib/modules',
ensure => directory,
}
notice("In the if condition with kernel version ${kernelrelease}")
package { 'linux-headers-2.6.38-11-generic':
ensure => installed
}
}
else
{
file { '"${kernelrelease}"/build':
path => '/lib/modules',
ensure => directory,
}
package { 'linux-headers-2.6.38-11-generic-pae':
ensure => installed
}

notice("In the else condition with kernel version ${kernelrelease}")
}

so any one can assit me what is wrong with my above code.

Thanks
 
Old 10-18-2011, 03:21 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
for Red Hat why not just let yum install the correct -devel for the kernel

Code:
su -
yum install kernel-devel
 
Old 10-18-2011, 11:35 PM   #3
smilemukul
Member
 
Registered: Jun 2009
Distribution: Redhat,CentOS,Ubuntu,Puppet
Posts: 292

Original Poster
Rep: Reputation: 34
actually my puppetmaster is CentOS 5.6 & my clients are Ubuntu 11.04 & my requirement is as mentioned above.

Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameter to execute shell script on puppet client through Puppet server niraj.kumar Linux - Server 3 02-08-2011 09:01 PM
[SOLVED] cURL Download Files from Manifest doby48 Linux - Software 1 06-22-2010 05:52 PM
read manifest from Windows dll kpachopoulos Programming 1 03-25-2009 10:28 PM
Slackware manifest searcher Sk8Board Kid Slackware 4 10-12-2007 08:16 PM
Error: read manifest failed andeveron Linux - Security 1 09-19-2003 09:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration