feat: Ansible 模板克隆 (后端 ClonePlaybook API + 前端卡片悬浮克隆按钮 + 模板管理入口)
This commit is contained in:
1 parent
2d02d63806
commit
7be277658a
4 files changed
+78
-1
No files matched your search
@@ -747,6 +747,10 @@ export const ansibleApi = {
|
||||
executePlaybook: async (id: number | string, targetHosts?: string[]) => {
|
||||
return http.post(`/ansible/playbooks/${id}/execute`, targetHosts ? { target_hosts: targetHosts } : undefined);
|
||||
},
|
||||
// 克隆 Playbook 为自定义模板 // Logan.Li
|
||||
clonePlaybook: async (id: number | string, name?: string) => {
|
||||
return http.post(`/ansible/playbooks/${id}/clone`, name ? { name } : undefined);
|
||||
},
|
||||
// 主机匹配预览 // Logan.Li
|
||||
matchHosts: async (params: { pattern?: string; match_type?: string; page?: number; page_size?: number }) => {
|
||||
return http.get<ListResponse>('/ansible/match-hosts', params);
|
||||
|
||||
Reference in new issue
Block a user