Extending molecule test to playbooks
Review should also execute molecule tests for ansible/test/play-xxx when anything in /ansible/test has been changed
Change-Id: I9a106a1c141b1053db6ac892e2dcecd4e646fd5b
Issue-ID: OOM-1801
Signed-off-by: Mateusz Pilat <m.pilat@partner.samsung.com>
diff --git a/ansible/test/bin/ci-molecule.sh b/ansible/test/bin/ci-molecule.sh
index be598a4..7859c8d 100755
--- a/ansible/test/bin/ci-molecule.sh
+++ b/ansible/test/bin/ci-molecule.sh
@@ -30,7 +30,7 @@
LOCAL_PATH=$(readlink -f "$SCRIPT_DIR")
ROLE_PATH=$1
-MOLECULE_CONTAINER=${MOLECULE_CONTAINER:-true}
+MOLECULE_CONTAINER=${MOLECULE_CONTAINER:-false}
echo "Build all pre-build images"
${LOCAL_PATH}/../images/docker/build-all.sh
diff --git a/ansible/test/bin/install-molecule.sh b/ansible/test/bin/install-molecule.sh
index f5350df..72b0793 100755
--- a/ansible/test/bin/install-molecule.sh
+++ b/ansible/test/bin/install-molecule.sh
@@ -33,7 +33,7 @@
VENV_PATH=${VENV_PATH:-~/molecule_venv}
# Create virtual env
-python3 -m venv ${VENV_PATH}
+python3.6 -m venv ${VENV_PATH}
# Activate virtual env
source ${VENV_PATH}/bin/activate
diff --git a/ansible/test/molecule-docker/Dockerfile b/ansible/test/molecule-docker/Dockerfile
index 6181731..5c2343c 100644
--- a/ansible/test/molecule-docker/Dockerfile
+++ b/ansible/test/molecule-docker/Dockerfile
@@ -14,7 +14,7 @@
addgroup -g ${GROUP_ID} ${DOCKER_USER} && \
adduser -D -u ${USER_ID} -G ${DOCKER_USER} ${DOCKER_USER} && \
# Add user to same docker group as in docker_host to be able to use docker driver as sudo
- groupadd docker-host -g ${DOCKER_GROUP_ID} && \
+ groupadd docker-host -f -g ${DOCKER_GROUP_ID} && \
usermod -aG ${DOCKER_GROUP_ID} ${DOCKER_USER} \
;fi