'Write hosts entries :attr:`hosts` from a module named `hosts` in the
hosts data file..
:param hosts: Hosts entries from a part in the data file.
:type hosts: list
:param mod_name: Name of a module from the data file.
:type mod_name: str'

def write_common_mod(self, hosts, mod_name):

    self.hosts_file.write(('%s#    Section    Start:    %s%s' % (self.eol, mod_name, self.eol)))
    for host in hosts:
        ip = host[0]
        if (len(ip) < 16):
            ip = ip.ljust(16)
        self.hosts_file.write(('%s    %s%s' % (ip, host[1], self.eol)))
        self.count += 1
    self.hosts_file.write(('#    Section    End:    %s%s' % (mod_name, self.eol)))
