Skip to content
Snippets Groups Projects
Verified Commit 1ae4a2d3 authored by Adam Lewenberg's avatar Adam Lewenberg
Browse files

more puppet5 changes

parent 2b53d345
No related branches found
No related tags found
1 merge request!7Puppet5 lonlone
......@@ -22,7 +22,7 @@ class base::ipmi (
) {
# If we are virtual or on EC2, then explicitly disable IPMI
if $::is_virtual == 'true' or $::ec2_profile == 'default-paravirtual' {
if ($is_virtual or ($::ec2_profile == 'default-paravirtual')) {
$real_ensure = absent
}
else {
......
<% os = @lsbdistdescription.gsub(/Debian GNU\/Linux/, "Debian")
os.gsub!(/Red Hat Enterprise Linux/i, 'RHEL')
os.gsub!(/RHEL (\w+) release (\d+) \(.* (\d+)\)/i, 'RHEL \1 \2u\3')
os.gsub!(/RHEL (\w+) release ([\d\.]+) \(.*\)/i, 'RHEL \1 \2')
os = os.gsub(/Red Hat Enterprise Linux/i, 'RHEL')
os = os.gsub(/RHEL (\w+) release (\d+) \(.* (\d+)\)/i, 'RHEL \1 \2u\3')
os = os.gsub(/RHEL (\w+) release ([\d\.]+) \(.*\)/i, 'RHEL \1 \2')
processor = @processor0.strip.gsub(/\s+/, " ")
processor = processor.strip.gsub(/\(R\)|\(TM\)/i, '')
......@@ -14,12 +14,12 @@
if product.nil?
product = "unknown"
else
product.strip!
product.gsub!(/VMware Virtual Platform/i, 'vmware')
product.gsub!(/ Server/i, '')
product.gsub!(/SUN BLADE /i, 'SB ')
product.gsub!(/Precision WorkStation /i, '')
product.gsub!(/ MODULE/i, '')
product = product.strip
product = product.gsub(/VMware Virtual Platform/i, 'vmware')
product = product.gsub(/ Server/i, '')
product = product.gsub(/SUN BLADE /i, 'SB ')
product = product.gsub(/Precision WorkStation /i, '')
product = product.gsub(/ MODULE/i, '')
end
sn = @serialnumber rescue nil
if @virtual == 'physical' and (! sn.nil?)
......@@ -28,17 +28,17 @@
memory = @memorysize
if memory.match(/\./)
memory.sub!(/0+ /, ' ')
memory.sub!(/\. /, ' ')
memory = memory.sub(/0+ /, ' ')
memory = memory.sub(/\. /, ' ')
end
memory.gsub!(/\s+/, '')
memory = memory.gsub(/\s+/, '')
swap = @swapsize
if swap.match(/\./)
swap.sub!(/0+ /, ' ')
swap.sub!(/\. /, ' ')
swap = swap.sub(/0+ /, ' ')
swap = swap.sub(/\. /, ' ')
end
swap.gsub!(/\s+/, '')
swap = swap.gsub(/\s+/, '')
-%>
<%= host %> - <%= os %>, <%= @architecture %>
<%= @processorcount %>-core <%= processor %> (<%= product %>); <%= memory %> RAM, <%= swap %> swap
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment