ansible: fix updating /opt/coverity/current

Remove the previous /opt/coverity/current symlink, before creating the
new one. Otherwise the new symlink would be created inside "current"
pointing at the old version, instead of replacing "current" with the
new symlink.

  # ln -svf /opt/coverity/2023.6.2/* /opt/coverity/current
  '/opt/coverity/current/cov-analysis-linux64-2023.6.2' -> '/opt/coverity/2023.6.2/cov-analysis-linux64-2023.6.2'
  # readlink /opt/covervity/current
  /opt/coverity/2022.06/cov-analysis-linux64-2022.6.0

Add the verbosity flag to the command while at it.

(The glob is unrelated, why it is needed is described in
 I2b96d1e47f2697706a042937b2852f0fc5032a7b)

Related: SYS#6685
Change-Id: I4ecb4997829b3cc61c839d089bda44f821ca8b85
This commit is contained in:
Oliver Smith 2023-12-08 09:56:33 +01:00 committed by osmith
parent 39dd96b390
commit 1fc7514296
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@
when: coverity_copy.failed == False
- name: create link /opt/coverity/current
shell: ln -sf /opt/coverity/{{ coverity_version }}/* /opt/coverity/current
shell: rm -vf /opt/coverity/current && ln -svf /opt/coverity/{{ coverity_version }}/* /opt/coverity/current
args:
warn: false
when: coverity_copy.failed == False