From 3113bf622830d11739f8a8f40aa6957a4b94ad7b Mon Sep 17 00:00:00 2001 From: David Wilson Date: Mon, 13 Aug 2018 13:32:23 +0100 Subject: [PATCH] tests: fix debops tests (py-apt broken if /var/lbi/apt missing) --- tests/image_prep/_container_setup.yml | 8 +++----- tests/image_prep/_user_accounts.yml | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/image_prep/_container_setup.yml b/tests/image_prep/_container_setup.yml index eabd97a8..db0d3789 100644 --- a/tests/image_prep/_container_setup.yml +++ b/tests/image_prep/_container_setup.yml @@ -13,7 +13,7 @@ fi - hosts: all - strategy: mitogen_linear + strategy: mitogen_free # Can't gather facts before here. gather_facts: true vars: @@ -60,12 +60,10 @@ - command: yum clean all when: distro == "CentOS" - - file: - path: "{{item}}" - state: absent + - shell: rm -rf {{item}}/* with_items: - /var/cache/apt - - /var/lib/apt + - /var/lib/apt/lists when: distro == "Debian" - user: diff --git a/tests/image_prep/_user_accounts.yml b/tests/image_prep/_user_accounts.yml index 1cb41a86..f9cac85c 100644 --- a/tests/image_prep/_user_accounts.yml +++ b/tests/image_prep/_user_accounts.yml @@ -6,7 +6,7 @@ - hosts: all gather_facts: true - strategy: mitogen_linear + strategy: mitogen_free become: true vars: distro: "{{ansible_distribution}}"