diff --git a/templates/cgconfig.erb b/templates/cgconfig.erb index 055c225..93bc695 100644 --- a/templates/cgconfig.erb +++ b/templates/cgconfig.erb @@ -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; @@ -25,37 +25,37 @@ mount { <% end %> group jenkins { - perm { - task { - uid = jenkins; - gid = jenkins; - } - admin { - uid = root; - gid = root; - } - } + perm { + task { + uid = jenkins; + gid = jenkins; + } + admin { + uid = root; + gid = root; + } + } } group jenkins/children { - perm { - task { - uid = jenkins; - gid = jenkins; - } - admin { - uid = root; - gid = root; - } - } - 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 - # Because of Red Hat bug 918951, swap management doesn't - # work in Fedora 18 but should be fixed in 19. %> + perm { + task { + uid = jenkins; + gid = jenkins; + } + admin { + uid = root; + gid = root; + } + } + 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 + # 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 %> - } + } } diff --git a/templates/jenkins_jobs.ini.erb b/templates/jenkins_jobs.ini.erb index 4d6d224..14873a1 100644 --- a/templates/jenkins_jobs.ini.erb +++ b/templates/jenkins_jobs.ini.erb @@ -1,4 +1,4 @@ [jenkins] -user=<%= username %> -password=<%= password %> -url=<%= url %> +user=<%= @username %> +password=<%= @password %> +url=<%= @url %> diff --git a/templates/openstack.js.erb b/templates/openstack.js.erb index 9497e32..6ca1a77 100644 --- a/templates/openstack.js.erb +++ b/templates/openstack.js.erb @@ -10,7 +10,7 @@ function makeDoubleDelegate(function1, function2) { function chgeLogo() { var imgs=document.getElementsByTagName("img"); var imgTag = document.createElement("img"); - imgTag.setAttribute("src","https://<%= vhost_name %>/plugin/simple-theme-plugin/title.png"); + imgTag.setAttribute("src","https://<%= @vhost_name %>/plugin/simple-theme-plugin/title.png"); imgTag.setAttribute("style", "vertical-align: middle;padding-left: 0.75em;"); imgs[0].parentNode.appendChild(imgTag); var spanTag = document.createElement("span");