From 11cf72b7e20d509a6ecaec9bb01f6d4daec6f12a Mon Sep 17 00:00:00 2001 From: Martin Schurz Date: Sun, 4 Feb 2024 10:54:22 +0100 Subject: [PATCH] Remove Docker containers on self-hosted runner after tests Signed-off-by: Martin Schurz --- molecule/os_hardening_vm/verify.yml | 2 +- molecule/ssh_hardening_bsd/verify.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule/os_hardening_vm/verify.yml b/molecule/os_hardening_vm/verify.yml index 912d2b39..fe813cb2 100644 --- a/molecule/os_hardening_vm/verify.yml +++ b/molecule/os_hardening_vm/verify.yml @@ -39,7 +39,7 @@ - name: Execute cinc-auditor tests ansible.builtin.command: > - docker run + docker run --rm --volume {{ molecule_ephemeral_directory }}:{{ molecule_ephemeral_directory }} docker.io/cincproject/auditor exec --ssh-config-file={{ molecule_ephemeral_directory }}/ssh-config diff --git a/molecule/ssh_hardening_bsd/verify.yml b/molecule/ssh_hardening_bsd/verify.yml index 1ab16053..6566f684 100644 --- a/molecule/ssh_hardening_bsd/verify.yml +++ b/molecule/ssh_hardening_bsd/verify.yml @@ -34,7 +34,7 @@ - name: Execute cinc-auditor tests ansible.builtin.command: > - docker run + docker run --rm --volume {{ molecule_ephemeral_directory }}:{{ molecule_ephemeral_directory }} --volume ./waivers_{{ lookup('env', 'MOLECULE_DISTRO') }}.yaml:/waivers.yaml docker.io/cincproject/auditor exec