1 <%- if scope.call_function('versioncmp', [@lsbmajdistrelease, '8']) <= 0 -%>
7 This device is for authorized users only. All traffic on this device
8 is monitored and will be used as evidence for prosecutions. By using
9 this machine you agree to abide by the Debian Machines Usage Policies
10 <URL:https://www.debian.org/devel/dmup>.
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16 #s.gsub(/(.{1,#{width}})(\s+|\Z)/, "\\1\n ")
17 s.split("\n").map{ |x|
18 if (x.length > width) then
19 #x.gsub!(/(.{1,#{width}}) +(?=\S)/, "\\1\n ")
20 x.gsub!(/(.{1,#{width}})( +|\Z)/, "\\1\n ")
27 l = l.gsub(/\[\[(.*?)\|(.*?)\]\]/, '\2')
28 l = l.gsub(/\[\[(\*|-)?(.*?)\]\]/, '\2')
32 if scope.lookupvar('site::nodeinfo')['ldap'].has_key?('architecture')
33 arch = scope.lookupvar('site::nodeinfo')['ldap']['architecture'][0]
39 if scope.lookupvar('site::nodeinfo').has_key?('nameinfo')
40 purp += " " + wrap(scope.lookupvar('site::nodeinfo')['nameinfo']) + "\n"
43 ninfo = scope.lookupvar('site::nodeinfo')
45 extra = 'Welcome to ' + @fqdn
46 if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('purpose'))
47 p = scope.lookupvar('site::nodeinfo')['ldap']['purpose'].clone()
51 entries += ", the Debian #{arch} build daemon"
53 if classes.include?("roles::porterbox")
54 entries += ", the Debian #{arch} porterbox"
59 entries += (entries == "") ? ", " : ". Also "
60 entries +="used for the following services:\n"
61 scope.lookupvar('site::nodeinfo')['ldap']['purpose'].sort.each do |l|
72 purp += " " + wrap(extra) + "\n"
74 if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('physicalHost'))
75 if ninfo['ldap']['physicalHost'][0] =~ /ganeti/
78 phys_host = 'physical host'
80 purp += wrap(" This virtual server runs on the #{phys_host} #{ninfo['ldap']['physicalHost'][0]}, " +
81 "which is hosted at #{ninfo['hoster']['longname']}."
83 elsif scope.lookupvar('site::nodeinfo')['hoster']['name']
84 purp += wrap(" This server is hosted at #{ninfo['hoster']['longname']}.")
89 scope.lookupvar('site::allnodeinfo').keys.sort.each do |node|
90 if scope.lookupvar('site::allnodeinfo')[node]['physicalHost'] and scope.lookupvar('site::allnodeinfo')[node]['physicalHost'].include?(@fqdn)
95 purp += "\nThe following virtual machines run on this system:\n"
98 if scope.lookupvar('site::allnodeinfo')[node]['purpose']
100 scope.lookupvar('site::allnodeinfo')[node]['purpose'].sort.each do |l|
102 purp += "\t " + l + "\n"
111 if scope.lookupvar('::cluster')
112 purp += "\n This server is a node in ganeti cluster: "
113 purp += scope.lookupvar('::cluster').to_s + ":\n"
114 purp += "\t" + scope.lookupvar('::cluster_nodes').split.sort.map{ |x| x.split('.')[0] }.join(", ") + ".\n"
117 purp += "\tCurrently the master node is $(cat /var/lib/ganeti/ssconf_master_node).\n"
118 #nodes = scope.lookupvar('::cluster_nodes').sort
119 #nodes.each do |node|
120 # purp += "\t" + node + "\n"
122 #nodes.reject{|node| node.eql?(fqdn)}.each do |node|
123 # purp += "\t" + node + "\n"
124 # scope.lookupvar('site::allnodeinfo')[node]['ipHostNumber'].each do |ip|
125 # purp += "\t\t" + ip + "\n"
131 if classes.include?("roles::porterbox")
132 purp += "\n " + wrap("Disk space on porter boxes is often limited. Please respect your fellow porters by cleaning up after yourself and deleting schroots and source/build trees in your ~ as soon as feasible. DSA reserves the right to recover disk space as necessary. See <URL:https://dsa.debian.org/doc/schroot/> for a brief tutorial on using schroot. There may be chroots for architectures other than #{arch} available, please list available chroots to check.")
135 if ninfo['not-bacula-client'] then
136 purp += "\n " + wrap("Note that this host is _NOT_ being backed up. If you care about your data, run your own backups.")
139 if scope.lookupvar('site::nodeinfo').has_key?('footer')
140 purp += "\n" + wrap(scope.lookupvar('site::nodeinfo')['footer'])
145 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
147 <%- if scope.call_function('versioncmp', [@lsbmajdistrelease, '8']) <= 0 -%>
152 # vim:set sts=2 ts=2:
153 # vim:set shiftwidth=2: