From 43ce1143e78d4f1abd242c9ca692354ceba7baa6 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Jul 21 2017 14:59:58 +0000 Subject: roles: Clear the remote_artifacts directory before use One problem I keep running into is that remote_artifacts directory exists and has files with failures in it. This results in false positives even after I've fixed the problem. --- diff --git a/roles/standard-test-beakerlib/tasks/main.yml b/roles/standard-test-beakerlib/tasks/main.yml index 59c29e1..9e7a13b 100644 --- a/roles/standard-test-beakerlib/tasks/main.yml +++ b/roles/standard-test-beakerlib/tasks/main.yml @@ -84,6 +84,9 @@ -e 's|/usr/share/rhts-library/rhtslib.sh|/usr/local/bin/beakerlib.sh|g' -e 's|/usr/bin/rstrnt-|/usr/local/bin/rstrnt-|g' +- name: Clear artifacts directory + file: path={{ remote_artifacts }} state=absent + - name: Make artifacts directory file: path={{ remote_artifacts }} state=directory owner=root mode=755 recurse=yes diff --git a/roles/standard-test-rhts/tasks/main.yml b/roles/standard-test-rhts/tasks/main.yml index d3cb844..1d9586c 100644 --- a/roles/standard-test-rhts/tasks/main.yml +++ b/roles/standard-test-rhts/tasks/main.yml @@ -139,6 +139,9 @@ cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys chmod 644 /root/.ssh/authorized_keys +- name: Clear artifacts directory + file: path={{ remote_artifacts }} state=absent + - name: Make artifacts directory file: path={{ remote_artifacts }} state=directory owner=root mode=755 recurse=yes