Authored by chunhua.zhang

add

... ... @@ -4,6 +4,16 @@
[java-wechat]
10.66.70.139
10.66.70.12
[java-erpgateway]
10.66.50.140
10.66.50.113
[java-promotion]
10.66.70.41
10.66.70.170
... ... @@ -19,6 +29,17 @@
10.66.70.96
[java-union]
10.66.70.21
10.66.70.49
10.66.103.20
[java-brower]
10.66.70.223
10.66.70.42
[java-message]
10.66.70.100
10.66.70.109
... ... @@ -46,3 +67,8 @@
10.66.70.9
10.66.70.128
[java-activity]
10.66.70.89
10.66.70.142
... ...
[java-nginx]
10.66.104.15
10.66.104.13
[java-promotion]
10.66.104.16
10.66.104.41
[java-sns]
10.66.104.12
10.66.104.48
[java-product]
10.66.104.12
10.66.104.48
[java-message]
10.66.104.12
10.66.104.48
[java-order]
10.66.104.16
10.66.104.41
[java-gateway]
10.66.104.2
10.66.104.44
10.66.104.28
10.66.104.29
[java-users]
10.66.104.10
10.66.104.43
[java-resources]
10.66.104.10
10.66.104.43
... ... @@ -4,6 +4,16 @@
[java-wechat]
10.66.104.7
10.66.104.39
[java-erpgateway]
10.66.104.7
10.66.104.39
[java-promotion]
10.66.104.16
10.66.104.41
... ... @@ -19,6 +29,17 @@
10.66.104.48
[java-union]
10.66.70.21
10.66.70.49
10.66.103.20
[java-brower]
10.66.104.7
10.66.104.39
[java-message]
10.66.104.12
10.66.104.48
... ... @@ -45,3 +66,8 @@
10.66.104.10
10.66.104.43
[java-activity]
10.66.104.17
10.66.104.26
... ...
... ... @@ -3,6 +3,16 @@
10.66.202.12
[java-wechat]
10.66.202.7
10.66.202.32
[java-erpgateway]
10.66.202.7
10.66.202.32
[java-promotion]
10.66.202.16
10.66.202.47
... ... @@ -18,6 +28,17 @@
10.66.202.39
[java-union]
10.66.70.21
10.66.70.49
10.66.103.20
[java-brower]
10.66.202.7
10.66.202.32
[java-message]
10.66.202.17
10.66.202.39
... ... @@ -43,3 +64,8 @@
10.66.202.11
10.66.202.21
[java-activity]
10.66.202.14
10.66.202.41
... ...
# Role on galaxy
- you.rolename
# Public role on github
- name: role-public
src: https://github.com/erasme/role-public.git
# Private role on github
- name: role-private
src: git+ssh://git@github.com/you/role-private.git
\ No newline at end of file
- name: auto-generate inventory files
... ...
... ... @@ -10,7 +10,7 @@ import json
import os
from subprocess import call
from jinja2 import Environment, PackageLoader
import collections
# clone deploy project to local
HOME = os.path.expanduser("~")
... ... @@ -32,7 +32,12 @@ host_group = { "yoho_gateway": "java-gateway",
"yohobuy_promotion": "java-promotion",
"yohobuy_product": "java-product",
"yoho_message": "java-message",
"yoho_sns": "java-sns"
"yoho_sns": "java-sns",
"yohobuy_brower": "java-brower",
"yohobuy_activity": "java-activity",
"yoho_erp_gateway": "java-erpgateway",
"yohobuy_wechat": "java-wechat",
"yohobuy_union": "java-union"
}
# all available zone groups
all_groups = {}
... ... @@ -69,8 +74,9 @@ for _az in azs_mappings.keys():
file = open(hosts, 'w')
#write template
sorted_dict = collections.OrderedDict(sorted(all_groups[az].keys()))
template = env.get_template('inventory-%s.j2' % az)
file.write(template.render(groups = all_groups[az]))
file.write(template.render(groups = sorted_dict ))
file.close()
... ...