Пример #1
0
 def run(self):
     # 如果是安装,优先在sge master上做操作,如果操作失败直接返回错误
     if self._state == "install":
         result = self.config_master()
         if result[0].get('status') != "success":
             return result
     return AnsibleTask(self.task_name,
                        self.extra_var).api_run(self.target_hosts)
Пример #2
0
 def run(self):
     return AnsibleTask(self.task_name,
                        self.extra_var).api_run(self.target_hosts)
Пример #3
0
 def config_master(self):
     task_name = "sge_master_add_exec"
     target_hosts = [self.sge_master_host]
     return AnsibleTask(task_name, self.extra_var).api_run(target_hosts)