ansible/coverity: extract into subdirectory

The tarball provided by coverity doesn't have the same version in the
name as in the directory inside the tarball.

Tarball:
	cov-analysis-linux64-2022.06.tar.gz
Directory:
	cov-analysis-linux64-2022.6.0

Work around this by extracting it into a subdirectory and using glob to
match the directory name.

Related: OS#5793
Change-Id: I2b96d1e47f2697706a042937b2852f0fc5032a7b
This commit is contained in:
Oliver Smith 2022-12-01 11:50:49 +01:00
parent 8125b33b9a
commit b0f36fe227
1 changed files with 7 additions and 8 deletions

View File

@ -13,9 +13,9 @@
ignore_errors: yes
tags: [coverity]
- name: create /opt/coverity
- name: create /opt/coverity/{{ coverity_version }}/
file:
path: /opt/coverity/
path: /opt/coverity/{{ coverity_version }}/
state: directory
when: coverity_copy.failed == False
tags: [coverity]
@ -23,16 +23,15 @@
- name: unpack coverity
unarchive:
src: "/tmp/{{ coverity_installer_file }}"
dest: /opt/coverity/
dest: /opt/coverity/{{ coverity_version }}
remote_src: yes
when: coverity_copy.failed == False
tags: [coverity]
- name: create link /opt/coverity/last
file:
src: /opt/coverity/cov-analysis-linux64-{{ coverity_version }}
dest: /opt/coverity/current
state: link
- name: create link /opt/coverity/current
shell: ln -sf /opt/coverity/{{ coverity_version }}/* /opt/coverity/current
args:
warn: false
when: coverity_copy.failed == False
tags: [coverity]