36 Commits
Author SHA1 Message Date
Zexi Li 492fbe2341 Merge pull request #10933 from rainzm/automated-cherry-pick-of-#10932-upstream-release-3.7
Automated cherry pick of #10932: Correctly execute the ansible playbook with the specified private key
2021-04-27 20:12:52 +08:00
rainzm 630729ca84 fix(ansibleserver): be compatible with empty params 2021-04-27 12:01:35 +08:00
rainzm 4088e47f92 fix(ansibleserver): add LF for privateKey if not 2021-04-26 18:59:44 +08:00
rainzm 7b0f45261d feat(ansibleserver): respect keepTmpdir when running ansibleplaybook v1 2021-04-26 18:59:44 +08:00
rainzm 9502cfebf4 fix(ansibleserver): don't init privateKey for ansibleplaybook if it already have one 2021-04-26 18:59:44 +08:00
Yousong Zhou a8857a34ab treewide: wait possible zombies 2021-04-20 22:08:15 +08:00
Yousong Zhou 26183d0de8 procutils: add WaitZombieLoop 2021-04-20 22:08:14 +08:00
Yousong Zhou 7f80003d24 ansibleserver: wait zombie subprocesses 2021-04-16 09:55:39 +08:00
rainzm c95f064d10 feat(ansibleserver): add reference and instance
Reference is a reference to a local or remote playbook without certain inventory
and its location is determined by playbookPath.
Instance is a complete playbook that can be executed directly, it is filled with inventory and config.
Instance ensures that the playbook is executed successfully as far as
possible without exceeding the maximum number of attempts
2021-04-07 18:50:29 +08:00
Yousong Zhou 6de0b2e35d ansibleserver: use mcclient module method for fetching keypair info 2021-02-23 15:34:23 +08:00
rainzm cfa426bc18 feat: add keep_tmpdir options
Setting 'keep_tmpdir' as true will keep tmpdir as used by executing
ansible playbook for debugging
2020-12-22 20:14:48 +08:00
Yousong Zhou 1ae8c97861 ansibleserver: register metadata manager
To quash the following error in log

  [E 200716 15:20:40 db.(*SMetadataResourceBaseModelManager).FetchCustomizeColumns(metadataresource.go:136)] FetchQueryObjectsByIds metadata fail Error 1146: Table 'yunionansible.metadata_tbl' doesn't exist
2020-07-16 17:52:46 +08:00
rainzm 77e5801ad9 fix: 'requirements' in ansibleplaybookv2 should be optional 2020-05-21 14:20:48 +08:00
Rain 331ba9bb37 feat/ansible_pb: Add support for requirements
You can declare the source info of the referenced role in requirements.
2020-05-08 11:08:32 +08:00
Qiu Jian 0d487cd601 bufix 20191209 2019-12-12 11:31:47 +08:00
Zhang Dongliang 6429e7b1f8 新增 devtool cron manager,用来管理Ansibleserver 的定时任务 2019-11-27 16:48:59 +08:00
Yousong Zhou 5b8fdcd5af ansibleserver: v2 models for exporting more features 2019-10-18 03:22:30 +00:00
Yousong Zhou 69efd53e80 ansibleserver: enable tenant/user cache manager 2019-10-10 08:10:08 +00:00
Yousong Zhou 53c7823f42 ansibleserver: 避免数据库故障引起内部状态不一致 2019-09-23 11:04:27 +00:00
Yousong Zhou 3e45f93cee ansibleserver: ansibleplaybooks: a way out on status chaos
an apb was in state

 - apb.output has content
 - apb.status == running
 - apb.start_time && apb.end_time both set
 - not present in man.sessions

an impossible state
2019-09-16 14:05:14 +00:00
Yousong Zhou d5c1ba04a3 ansibleserver: 限定Playbook字段长度
避免进入数据库时被截断产生无效数据
2019-09-10 09:13:27 +00:00
Yousong Zhou e813eb5bb2 ansibleserver: 操作宿主机时默认使用用户root 2019-08-02 03:55:25 +00:00
Yousong Zhou b83ea8e55e ansibleplaybooks: 改正输出溢出时的记录 2019-07-27 01:03:02 +00:00
Yousong Zhou e6c3e98a6d ansibleplaybooks: 增量式记录输出 2019-07-26 15:21:15 +00:00
Yousong Zhou ab873ef90d ansibleplaybooks: Output字段使用mediumtext 2019-07-26 15:21:15 +00:00
Yousong Zhou c3733e282b ansibleplaybooks: 改正启动失败问题 2019-07-26 15:21:15 +00:00
Zexi 78975cda56 db: app service support --exit-after-db-init 2019-07-16 19:11:50 +08:00
Zexi 81ce05e391 service db init sync exit 2019-07-16 18:46:46 +08:00
Yousong Zhou 8dae52e0dc ansibleserver: 直接指定IP地址时默认ansible_user指定 2019-06-26 12:56:38 +00:00
Jian Qiu 92b90cdbe0 fix: protect projects with resources in any services (#1337) 2019-06-21 09:09:27 +08:00
Yousong Zhou 68ed59eda0 ansibleserver: 在pb执行失败时打出警告日志 2019-06-20 09:03:01 +00:00
Qiu Jian af47a803a6 fix: cloud-region/zone add domain&scope filter 2019-06-14 18:14:48 +08:00
Yousong Zhou 77d7d3a46b ansibleserver: 使用API查sshkeypairs 2019-06-12 08:16:56 +00:00
Yousong Zhou 7d33702294 ansibleserver: 避免持锁不释放的情况 2019-06-12 08:16:55 +00:00
Yousong Zhou 76d1ddf33b ansibleserver: 创建opslog表 2019-06-12 08:16:55 +00:00
Yousong Zhou 966694389c ansibleserver: as a separate service 2019-06-10 15:39:05 +00:00