[fix] role:mas:conf compose script
This commit is contained in:
parent
52862bb20f
commit
8e73310fae
1 changed files with 14 additions and 7 deletions
|
@ -103,16 +103,23 @@ def main():
|
|||
data = {}
|
||||
### base
|
||||
if True:
|
||||
data_ = _json.loads(file_read(args.base_file_path))
|
||||
data = dict_merge(data, data_)
|
||||
data = dict_merge(
|
||||
data,
|
||||
_json.loads(file_read(args.base_file_path))
|
||||
)
|
||||
### clients
|
||||
if True:
|
||||
for name in _os.listdir(args.clients_directory_path):
|
||||
data__ = _json.loads(file_read(_os.path.join(args.clients_directory_path, name)))
|
||||
data_ = {
|
||||
"clients": data__
|
||||
data = dict_merge(
|
||||
data,
|
||||
{
|
||||
"clients": list(
|
||||
map(
|
||||
lambda name: _json.loads(file_read(_os.path.join(args.clients_directory_path, name))),
|
||||
_os.listdir(args.clients_directory_path)
|
||||
)
|
||||
),
|
||||
}
|
||||
data = dict_merge(data, data_)
|
||||
)
|
||||
## output
|
||||
if True:
|
||||
if (args.output_format == "json"):
|
||||
|
|
Loading…
Add table
Reference in a new issue