未验证 提交 bfc04828 编写于 作者: Y Yanan Fu 提交者: GitHub

Merge pull request #2152 from qcheng-redhat/kar_deploy

Avoid duplicated deployment of kar on L1 guest
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
bs_options: "{{bootstrap_options}}" bs_options: "{{bootstrap_options}}"
host_log_dir: "{{host_log_files_dir}}" host_log_dir: "{{host_log_files_dir}}"
cmd_line: "{{command_line}}" cmd_line: "{{command_line}}"
flag: True
tasks: tasks:
...@@ -40,18 +39,40 @@ ...@@ -40,18 +39,40 @@
/usr/bin/update-ca-trust extract /usr/bin/update-ca-trust extract
when: dnld_cert_output.changed when: dnld_cert_output.changed
# The following two tasks need to be modified, check if kar already deployed, if true, skip. - name: Check kar folder exists
- name: clone kar stat:
path: '{{kar_local}}'
register: kar_folder
- name: Clone kar
git: git:
repo: '{{kar_repo}}' repo: '{{kar_repo}}'
dest: '{{kar_local}}' dest: '{{kar_local}}'
force: yes when: not kar_folder.stat.exists
- name: Run bootstrap script - name: Run bootstrap script
command: ./Bootstrap.sh {{bs_options}} command: ./Bootstrap.sh {{bs_options}}
args: args:
chdir: '{{kar_local}}' chdir: '{{kar_local}}'
when: not kar_folder.stat.exists
register: bootstrap_result register: bootstrap_result
ignore_errors: True
- name: Remove kar folder when bootstrap failed
file:
path: '{{kar_local}}'
state: absent
when: bootstrap_result is failed
- name: Clean env when bootstrap failed
pip:
name: aexpect, avocado-framework, avocado-framework-plugin-vt, avocado-framework-plugin-result-html
state: absent
when: bootstrap_result is failed
- fail:
msg: "bootstrap script failed"
when: bootstrap_result is failed
- name: Run case - name: Run case
shell: shell:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册