crans_bcfg2/Python/etc/hosts
2015-05-02 12:46:41 +02:00

32 lines
957 B
Python

# -*- coding: utf-8; mode: python -*-
include("ip")
@127.0.0.1 localhost.crans.org localhost
if has("crans-proxmox-wheezy"):
print pubip(), pubhostname
print admip(), admhostname, hostname+".adm", hostname
elif not has("non-vlan-adherent"):
print pubip(), pubhostname, hostname
print admip(), admhostname, hostname+".adm"
else:
print admip(), admhostname, hostname+".adm", hostname
if has("vlan-wifi"):
print wifiip(), wifihostname, hostname+".wifi"
@10.231.136.7 zbee.adm.crans.org zbee.adm zbee nfs.adm.crans.org nfs.adm nfs
if(has("odlyd")):
print "138.231.136.9 sable.crans.org sable"
print "138.231.136.98 charybde.crans.org charybde"
if(has("iscsi")):
print "10.231.136.36 nols.adm.crans.org nols.adm nols"
@# The following lines are desirable for IPv6 capable hosts
@::1 ip6-localhost ip6-loopback
@fe00::0 ip6-localnet
@ff00::0 ip6-mcastprefix
@ff02::1 ip6-allnodes
@ff02::2 ip6-allrouters
@ff02::3 ip6-allhosts