commit broken stuff
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
7a7413f1f4
commit
572401e4f8
1 changed files with 19 additions and 3 deletions
22
bin/cdist
22
bin/cdist
|
@ -22,8 +22,22 @@
|
|||
import sys # argv
|
||||
import subprocess # execute stuff
|
||||
import os
|
||||
import tempfile
|
||||
import shutil
|
||||
|
||||
__cdist_version="2.0.0"
|
||||
|
||||
class Cdist:
|
||||
"""Cdist main class to hold arbitrary data"""
|
||||
version="2.0.0"
|
||||
|
||||
def __init__(self):
|
||||
self.tempdir = tempfile.mkdtemp()
|
||||
print(self.tempdir)
|
||||
|
||||
def __del__(self):
|
||||
print("Zerstoeren")
|
||||
print(self.tempdir)
|
||||
shutil.rmtree(self.tempdir)
|
||||
|
||||
def logger(type, *args):
|
||||
"""Ignore type for now, support later"""
|
||||
|
@ -76,7 +90,7 @@ def remote_conf_directory():
|
|||
return os.path.join(remote_base_directory(), "conf")
|
||||
|
||||
def out_dir():
|
||||
FIXME: stopped - probably need static temp know!
|
||||
# FIXME: stopped - probably need static temp know!
|
||||
"""Local directory containing output"""
|
||||
return os.path.join(base_directory(), "conf")
|
||||
|
||||
|
@ -134,7 +148,9 @@ def cdist_deploy_to(hostname):
|
|||
|
||||
if __name__ == "__main__":
|
||||
hostname=sys.argv[1]
|
||||
logger("info", "cdist", __cdist_version, ": Configuring host", hostname)
|
||||
# logger("info", "cdist", cdist_version, ": Configuring host", hostname)
|
||||
cdist_deploy_to(hostname)
|
||||
print(list_global_explorers())
|
||||
|
||||
c = Cdist()
|
||||
|
||||
|
|
Loading…
Reference in a new issue