Optimize test for 'resource-data' role

Moved 'file' package installation from Molecule's
'prepare' stage to Dockerfile to shorten the test
invocation.

Change-Id: Icbb805c54a4fd42003d0cde037fa56208bd6008a
Issue-ID: OOM-1809
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
diff --git a/ansible/test/images/docker/centos7/Dockerfile b/ansible/test/images/docker/centos7/Dockerfile
index 67e3fb9..0f6e559 100644
--- a/ansible/test/images/docker/centos7/Dockerfile
+++ b/ansible/test/images/docker/centos7/Dockerfile
@@ -3,7 +3,7 @@
 RUN yum -y update && yum clean all
 
 RUN yum -y install openssh-server sudo openssh-clients \
-    epel-release python-docker-py iproute e2fsprogs
+    epel-release python-docker-py iproute e2fsprogs file
 RUN systemctl enable sshd.service
 
 VOLUME ["/run"]
diff --git a/ansible/test/roles/prepare-resource-data/tasks/prepare-infra-server.yml b/ansible/test/roles/prepare-resource-data/tasks/prepare-infra-server.yml
index b55842a..dfaca80 100644
--- a/ansible/test/roles/prepare-resource-data/tasks/prepare-infra-server.yml
+++ b/ansible/test/roles/prepare-resource-data/tasks/prepare-infra-server.yml
@@ -12,5 +12,4 @@
     name: nfs-utils
     state: present
   when:
-    - resources_on_nfs is defined
     - resources_on_nfs
diff --git a/ansible/test/roles/prepare-resource-data/tasks/prepare-resource-server.yml b/ansible/test/roles/prepare-resource-data/tasks/prepare-resource-server.yml
index 4057ba1..1f12555 100644
--- a/ansible/test/roles/prepare-resource-data/tasks/prepare-resource-server.yml
+++ b/ansible/test/roles/prepare-resource-data/tasks/prepare-resource-server.yml
@@ -1,9 +1,4 @@
 ---
-- name: Install file exacutable if not there for archive compression checking
-  package:
-    name: file
-    state: present
-
 - name: "Create resource dir {{ resources_dir }}"
   file:
     path: "{{ resources_dir }}/{{ subdir }}"
@@ -68,5 +63,4 @@
     - name: Export nfs
       command: exportfs -ar
   when:
-    - resources_on_nfs is defined
     - resources_on_nfs