Add molecule testing for CentOS machines 41/12541/6
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 11 Sep 2018 20:21:19 +0000 (16:21 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 13 Sep 2018 17:55:13 +0000 (13:55 -0400)
Add the systemd workaround for CentOS systems so that we can
enable molecule testing.

Change-Id: I3cdeb4b386f8c2ea4183be0423fd7b5daf3ebda2
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
defaults/main.yml
molecule/default/molecule.yml
tasks/main.yml

index a37d6a8..0d34070 100644 (file)
@@ -1,2 +1,3 @@
 ---
+docker_service_enable: true
 mtu: 1500
index 3423388..feddd52 100644 (file)
@@ -6,14 +6,18 @@ driver:
 lint:
   name: yamllint
 platforms:
-  # Disable centos7 tests until we figure out how to get systemctl working
-  # in a Docker container reliabily.
-  # - name: centos7
-  #   image: centos:7
+  - name: centos7
+    image: centos:7
+    groups:
+      - centos
   - name: ubuntu1604
     image: ubuntu:16.04
 provisioner:
   name: ansible
+  inventory:
+    group_vars:
+      centos:
+        docker_service_enable: false
   lint:
     name: ansible-lint
 scenario:
index a952365..dc87459 100644 (file)
@@ -67,4 +67,5 @@
 
 - name: Enable Docker service
   service: name=docker enabled=true
+  when: docker_service_enable
   become: true