Fixing deprecation warnings

Non instance variable representation is deprecated
so needs to be changed. This change changes varibles
to their instance variable representation.

See more details see:
http://docs.puppetlabs.com/guides/templating.html

Change-Id: Ib77827e01011ef6c0380c9ec7a9d147eafd8ce2f
This commit is contained in:
Spencer Krum 2014-06-18 15:44:01 -07:00 committed by Spencer Krum
parent e6047a710c
commit 3bd235bfcc

View File

@ -1,7 +1,7 @@
<% if operatingsystem == "Fedora" then
<% if @operatingsystem == "Fedora" then
# Fedora auto-mounts subsystems under /sys/fs/cgroup/ already, so no
# mount section is needed. %>
<% elsif osfamily == "RedHat" then %>
<% elsif @osfamily == "RedHat" then %>
mount {
cpuset = /cgroup/cpuset;
@ -14,7 +14,7 @@ mount {
blkio = /cgroup/blkio;
}
<% elsif ( operatingsystemrelease < '12.10' ) or ( operatingsystem != 'Ubuntu' ) then %>
<% elsif ( @operatingsystemrelease < '12.10' ) or ( @operatingsystem != 'Ubuntu' ) then %>
mount {
cpu = /sys/fs/cgroup/cpu;
cpuacct = /sys/fs/cgroup/cpuacct;
@ -49,13 +49,13 @@ group jenkins/children {
}
}
memory {
memory.soft_limit_in_bytes = <%= (memorytotalbytes.to_f * 0.75).to_i %>;
memory.limit_in_bytes = <%= (memorytotalbytes.to_f * 0.9).to_i %>;
<% if (operatingsystem == "Fedora") and (operatingsystemrelease == "18") then
memory.soft_limit_in_bytes = <%= (@memorytotalbytes.to_f * 0.75).to_i %>;
memory.limit_in_bytes = <%= (@memorytotalbytes.to_f * 0.9).to_i %>;
<% if (@operatingsystem == "Fedora") and (@operatingsystemrelease == "18") then
# Because of Red Hat bug 918951, swap management doesn't
# work in Fedora 18 but should be fixed in 19. %>
<% else %>
memory.memsw.limit_in_bytes = <%= (memorytotalbytes.to_f * 0.9).to_i %>;
memory.memsw.limit_in_bytes = <%= (@memorytotalbytes.to_f * 0.9).to_i %>;
<% end %>
}
}