diff options
author | Oliver Smith <osmith@sysmocom.de> | 2022-12-01 11:50:49 +0100 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2022-12-01 13:08:28 +0100 |
commit | b0f36fe22737cc1329c84170e16d97b81bb3ba34 (patch) | |
tree | 68174b5c2d2226428defbbcd4d8090ae03c04d98 | |
parent | 8125b33b9a15dc0497ebe4697fa3758831b9430b (diff) |
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
-rw-r--r-- | ansible/roles/install-coverity/tasks/main.yml | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/ansible/roles/install-coverity/tasks/main.yml b/ansible/roles/install-coverity/tasks/main.yml index 5baf6f3..4047fb8 100644 --- a/ansible/roles/install-coverity/tasks/main.yml +++ b/ansible/roles/install-coverity/tasks/main.yml @@ -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] |