...
|
...
|
@@ -47,16 +47,19 @@ class switch_handler(): |
|
|
#Load DNS params
|
|
|
self.zone1_yml = '{0}/inventories/az1/group_vars/all.yml'.format(self.project_home)
|
|
|
self.zone2_yml = '{0}/inventories/az2/group_vars/all.yml'.format(self.project_home)
|
|
|
self.zone3_yml = '{0}/inventories/az3/group_vars/all.yml'.format(self.project_home)
|
|
|
self.zone1_tmp_yml = '{0}/inventories/az1/group_vars/.switch.yml.tmp'.format(self.project_home)
|
|
|
self.zone2_tmp_yml = '{0}/inventories/az2/group_vars/.switch.yml.tmp'.format(self.project_home)
|
|
|
self.zone3_tmp_yml = '{0}/inventories/az3/group_vars/.switch.yml.tmp'.format(self.project_home)
|
|
|
self.az1_vars = open(self.zone1_yml).read().strip('\n').split('\n')
|
|
|
self.az2_vars = open(self.zone2_yml).read().strip('\n').split('\n')
|
|
|
self.az3_vars = open(self.zone3_yml).read().strip('\n').split('\n')
|
|
|
self.dns_playbook = '{0}/playbooks/yoho.dns.yml'.format(self.project_home)
|
|
|
|
|
|
|
|
|
def run(self):
|
|
|
os.chdir(self.project_home)
|
|
|
varsMarker = vars_maker(self.az1_vars,self.az2_vars,self.zone1_tmp_yml,self.zone2_tmp_yml)
|
|
|
varsMarker = vars_maker(self.az1_vars,self.az2_vars,self.az3_vars,self.zone1_tmp_yml,self.zone2_tmp_yml,self.zone3_tmp_yml)
|
|
|
dbHandler = db_handler(self.zone,self.project_home,self.db_playbook,self.key_file)
|
|
|
dnsHandler = dns_handler(self.zone,self.project_home,self.dns_playbook,self.key_file)
|
|
|
cobarHandler = cobar_handler(self.zone,self.project_home,self.cobar_playbook,self.key_file,self.passwd)
|
...
|
...
|
|