1 <% if @lsbmajdistrelease >= '7' -%>
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:http://www.debian.org/devel/dmup>.
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
16 s.gsub(/(.{1,#{width}})( +|\Z)/, "\\1\n ")
20 l = l.gsub(/\[\[(.*?)\|(.*?)\]\]/, '\2')
21 l = l.gsub(/\[\[(\*|-)?(.*?)\]\]/, '\2')
25 if scope.lookupvar('site::nodeinfo')['ldap'].has_key?('architecture')
26 arch = scope.lookupvar('site::nodeinfo')['ldap']['architecture'][0]
32 if scope.lookupvar('site::nodeinfo').has_key?('nameinfo')
33 purp += " " + wrap(scope.lookupvar('site::nodeinfo')['nameinfo']) + "\n"
36 ninfo = scope.lookupvar('site::nodeinfo')
38 extra = 'Welcome to ' + fqdn
39 if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('purpose'))
40 p = scope.lookupvar('site::nodeinfo')['ldap']['purpose'].clone()
44 entries += ", the Debian #{arch} build daemon"
46 if p.delete('porterbox') or classes.include?("porterbox")
47 entries += ", the Debian #{arch} porterbox"
51 entries += (entries == "") ? ", " : ". Also"
52 entries +="used for the following services:\n"
53 scope.lookupvar('site::nodeinfo')['ldap']['purpose'].sort.each do |l|
64 purp += " " + wrap(extra)
66 if (scope.lookupvar('site::nodeinfo')['ldap'].has_key?('physicalHost'))
67 if ninfo['ldap']['physicalHost'][0] =~ /ganeti/
70 phys_host = 'physical host'
72 purp += wrap(" This virtual server runs on the #{phys_host} #{ninfo['ldap']['physicalHost'][0]}, " +
73 "which is hosted at #{ninfo['hoster']['longname']}."
75 elsif scope.lookupvar('site::nodeinfo')['hoster']['name']
76 purp += wrap(" This server is hosted at #{ninfo['hoster']['longname']}.")
81 scope.lookupvar('site::allnodeinfo').keys.sort.each do |node|
82 if scope.lookupvar('site::allnodeinfo')[node]['physicalHost'] and scope.lookupvar('site::allnodeinfo')[node]['physicalHost'].include?(fqdn)
87 purp += "\nThe following virtual machines run on this system:\n"
90 if scope.lookupvar('site::allnodeinfo')[node]['purpose']
92 scope.lookupvar('site::allnodeinfo')[node]['purpose'].sort.each do |l|
94 purp += "\t " + l + "\n"
103 if scope.lookupvar('::cluster').to_s != 'undefined'
104 purp += "\n This server is a node in ganeti cluster: "
105 purp += scope.lookupvar('::cluster').to_s + ":\n"
106 purp += "\t" + scope.lookupvar('::cluster_nodes').to_s.split.sort.map{ |x| x.split('.')[0] }.join(", ") + ".\n"
108 if @lsbmajdistrelease >= '7'
110 purp += "\tCurrently the master node is $(cat /var/lib/ganeti/ssconf_master_node).\n"
112 #nodes = scope.lookupvar('::cluster_nodes').to_s.split.sort
113 #nodes.each do |node|
114 # purp += "\t" + node + "\n"
116 #nodes.reject{|node| node.eql?(fqdn)}.each do |node|
117 # purp += "\t" + node + "\n"
118 # scope.lookupvar('site::allnodeinfo')[node]['ipHostNumber'].each do |ip|
119 # purp += "\t\t" + ip + "\n"
125 if classes.include?("porterbox")
126 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:http://dsa.debian.org/doc/schroot/> for a brief tutorial on using schroot.")
129 if ninfo['not-bacula-client'] then
130 purp += "\n " + wrap("Note that this host is _NOT_ being backed up. If you care about your data, run your own backups.")
133 if scope.lookupvar('site::nodeinfo').has_key?('footer')
134 purp += "\n" + wrap(scope.lookupvar('site::nodeinfo')['footer'])
140 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
142 <% if @lsbmajdistrelease >= '7' -%>
147 # vim:set sts=2 ts=2:
148 # vim:set shiftwidth=2: