nodes.py: autogenerate hostname if not set in nodefile
This commit is contained in:
parent
067b498bf2
commit
ae82e9cd51
3 changed files with 4 additions and 2 deletions
4
nodes.py
4
nodes.py
|
@ -5,3 +5,7 @@ nodes = {}
|
|||
for node in Path(join(repo_path, "nodes")).rglob("*.py"):
|
||||
with open(node, 'r') as f:
|
||||
exec(f.read())
|
||||
|
||||
for name, data in nodes.items():
|
||||
if 'hostname' not in data.keys():
|
||||
data['hostname'] = '.'.join(reversed(name.split('.'))) + '.kunbox.net'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue