reword simulate option
This commit is contained in:
parent
6eb6cc3346
commit
18759bdec0
|
@ -6,7 +6,7 @@ import yaml
|
|||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--config', type=str, default='/etc/publik/publik.conf')
|
||||
parser.add_argument('--debug', action='store_true')
|
||||
parser.add_argument('--simulate', action='store_true')
|
||||
parser.add_argument('--configure', action='store_true')
|
||||
args = parser.parse_args()
|
||||
|
||||
|
@ -77,13 +77,13 @@ def configure_briques(connection, databases, roles):
|
|||
settings_d = '/etc/%s/settings.d' % service
|
||||
settings = '%s/connection.py' % settings_d
|
||||
|
||||
if not os.path.isdir(settings_d) and not args.debug:
|
||||
if not os.path.isdir(settings_d) and not args.simultate:
|
||||
os.system('mkdir -p %s' % settings_d)
|
||||
|
||||
s = model.format(database=database, host=connection['host'],
|
||||
port=connection['port'], password=password)
|
||||
|
||||
if args.debug:
|
||||
if args.simulate:
|
||||
print(s)
|
||||
continue
|
||||
|
||||
|
@ -105,7 +105,7 @@ def create_databases(connection, instance, databases, roles):
|
|||
password = False
|
||||
cmds.append(gen_cmd(database, role, password))
|
||||
|
||||
if args.debug:
|
||||
if args.simulate:
|
||||
print(connection)
|
||||
for c in cmds:
|
||||
print(c)
|
||||
|
|
Loading…
Reference in New Issue