I'm trying to write a script that runs command based on version of Redhat OS. For example, if the RHEL version is 6.0, it will run command. I was able to write file read script in ruby that would read file and execute but it didn't seem to work in puppet script. Has anyone done something like this?
$redhat_version_file = "/etc/redhat-release" $redhat_version = "File.read($redhat_version_file)" if ($redhat_version =~ /6.0/) { command } or $redhat_version_file = "/etc/redhat-release" if ( File.open($redhat_version_file).read().include? "6.0") {command} -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.