Metadata-Version: 1.2
Name: hostlist
Version: 1.1.0
Summary: Sync hostlist and builds config files for services.
Home-page: https://github.com/particlekit/hostlist
License: UNKNOWN
Author: Robin Roth
Author-email: robin.roth@kit.edu
Requires-Python: >=3.2
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Environment :: Console
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: POSIX :: Linux
Classifier: Topic :: System :: Systems Administration
Requires-Dist: PyYAML
Requires-Dist: termcolor
Requires-Dist: requests
Requires-Dist: cherrypy
Requires-Dist: GitPython

hostlist
========

Hostlist reads yaml lists with information about hosts and generates
config files and inventory for several services.


Quickstart
----------

Example input files are in the `tests` directory. Hostlists are defined in the `hostslists` subdirectory, where the filename
encodes the `hosttype` and `institute` attributes of the contained hosts.

Run `buildfiles` to generate the output.
`buildfiles --help` shows the available options.

Configuration
-------------

The main configuration is in ``config.yml`` in the working directory. 
Hostlists are collected in a directory listed in ``config.yml``.

Services
--------

At the moment the supported services are:

* /etc/hosts, can also be used for dnsmasq
* dhcpd
* ansible inventory
* munin 
* ssh_known_hosts generation


Web daemon
----------

You can start `hostlist-daemon` to serve the generated content via http. Start `hostlist-daemon` where you would run `buildfiles`.
The daemon is based on cherrypy and has a config file daemon.conf. 


Example
-------

A working example for inputs and all configuratino files can be found in `tests`.

DNSVS Synchronization
---------------------

Besides generating config files, the hostlist can also be synchronized against
DNSVS, which is the dns management system used by https://www.scc.kit.edu.

Tests
-----
To run the tests:
::

  cd tests; py.test

Contribute
----------
Feel free to use the code and adjust it to your needs.
Pull requests are welcome!

Style guide
-----------

The code should obey PEP8 (as enforced by flake8 or pylint) when possible.

