Commit 6dbd8c7e authored by m.pausch's avatar m.pausch
Browse files

Fix deprecation-warnings in templates

parent 1315fca5
......@@ -6,4 +6,4 @@ description 'System Software configuration and maintenance'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
source_url 'https://github.com/GSI-HPC/sys-chef-cookbook'
issues_url 'https://github.com/GSI-HPC/sys-chef-cookbook/issues'
version '1.28.0'
version '1.28.1'
......@@ -4,7 +4,7 @@
#
# This file is managed by the Chef `sys` cookbook.
node_name '<%= node.fqdn %>'
node_name '<%= node['fqdn'] %>'
chef_server_url '<%= @server_url %>'
client_key "<%= @client_key %>"
......
......@@ -3,7 +3,7 @@
# for the NEED_ options are "yes" and "no".
# Do you want to start the statd daemon? It is not needed for NFSv4.
<%= node.sys.nfs.krb5 ? 'NEED_STATD="no"' : 'NEED_IDMAPD="yes"' %>
<%= node['sys']['nfs']['krb5'] ? 'NEED_STATD="no"' : 'NEED_IDMAPD="yes"' %>
# Options for rpc.statd.
# Should rpc.statd listen on a specific port? This is especially useful
......@@ -13,7 +13,7 @@
STATDOPTS=
# Do you want to start the idmapd daemon? It is only needed for NFSv4.
<%= node.sys.nfs.krb5 ? 'NEED_IDMAPD="yes"' : "NEED_IDMAPD=" %>
<%= node['sys']['nfs']['krb5'] ? 'NEED_IDMAPD="yes"' : "NEED_IDMAPD=" %>
# Do you want to start the gssd daemon? It is required for Kerberos mounts.
<%= node.sys.nfs.krb5 ? 'NEED_GSSD="yes"' : "NEED_GSSD=" %>
<%= node['sys']['nfs']['krb5'] ? 'NEED_GSSD="yes"' : "NEED_GSSD=" %>
......@@ -10,5 +10,5 @@ K5START_START="yes"
# Options for k5start.
K5START_KEYTAB=/etc/nslcd.keytab
K5START_CCREFRESH=60
K5START_PRINCIPAL='nslcd/<%= node.fqdn %>'
K5START_PRINCIPAL='nslcd/<%= node['fqdn'] %>'
K5START_CCFILE='/tmp/krb5cc_nslcd'
......@@ -3,7 +3,7 @@
# Configuration file for ferm(1), created by Chef cookbook sys::ferm
#
<% node.sys.ferm.rules.each do |domain, tables| -%>
<% node['sys']['ferm']['rules'].each do |domain, tables| -%>
domain <%= domain %> {
<% tables.each do |table, chains| -%>
table <%= table %> {
......@@ -18,4 +18,3 @@ domain <%= domain %> {
<% end -%>
}
<% end -%>
<% node.sys.nscd.each do |map, config| -%>
<% node['sys']['nscd'].each do |map, config| -%>
<% max = config.keys.max { |a, b| a.length <=> b.length }.length %>
<% config.each do |k,v| -%>
<% spaces = ""; (max + 1 - k.length).times { spaces << " " } -%>
......
......@@ -19,6 +19,6 @@ base <%= @searchbase -%>
sasl_mech GSSAPI
sasl_realm <%= @realm %>
sasl_authcid nslcd/<%= node.fqdn %>@<%= @realm %>
sasl_authzid u:nslcd/<%= node.fqdn %>
sasl_authcid nslcd/<%= node['fqdn'] %>@<%= @realm %>
sasl_authzid u:nslcd/<%= node['fqdn'] %>
krb5_ccname /tmp/krb5cc_nslcd
......@@ -4,5 +4,5 @@
#
# This file is managed by the Chef `sys` cookbook.
@<%= node.fqdn %> @gsi.de
@<%= node.hostname%> @gsi.de
@<%= node['fqdn'] %> @gsi.de
@<%= node['hostname'] %> @gsi.de
......@@ -32,12 +32,12 @@ readme_directory = no
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = <%= node.fqdn %>
myhostname = <%= node['fqdn'] %>
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_alias_maps = <%= @virtual_alias_maps %>
myorigin = /etc/mailname
mydestination = <%= node.fqdn %>, localhost.<%= node.domain %>, localhost <%= @mydestination ? ", #{@mydestination}" : '' %>
mydestination = <%= node['fqdn'] %>, localhost.<%= node['domain'] %>, localhost <%= @mydestination ? ", #{@mydestination}" : '' %>
<%# TODO: no MX lookups as long as brackets are hard-coded here -%>
relayhost = [<%= @relay %>]
<%= "relay_domains = #{@relay_domains.join(', ')}" if @relay_domains %>
......
......@@ -32,14 +32,14 @@ mem_free_perc=$(free | grep Mem | awk '{printf "%.2f%%" , $4/$2 * 100.0}')
mem_free_perccc=$(free | grep "buffers/cache" | awk '{printf "%.2f%%" , $4/($3+$4) * 100.0}')
echo "
Node: <%= node.fqdn %> (<%= node.ipaddress %>)
Platform: <%= node.lsb.description if node.lsb.has_key? 'description' %>
Node: <%= node['fqdn'] %> (<%= node['ipaddress'] %>)
Platform: <%= node['lsb']['description'] if node['lsb'].has_key? 'description' %>
<% unless Chef::Config[:solo] %>
Chef-Server: <%= Chef::Config.chef_server_url %>
<% else %>
Chef-Solo: <%= Time.now %>
<% end %>
Run-list: <%= node.run_list %>
Run-list: <%= node['run_list'] %>
Tasks: $procs
Load: $(cat /proc/loadavg | cut -d' ' -f1-3)
CPU(s)%: $cpus
......
......@@ -9,7 +9,7 @@ Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
Host_Alias LOCAL = <%= node.fqdn %>
Host_Alias LOCAL = <%= node['fqdn'] %>
# User alias specification
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment