diff --git a/Puppetfile_unit b/Puppetfile_unit
new file mode 100644
index 000000000..da753928d
--- /dev/null
+++ b/Puppetfile_unit
@@ -0,0 +1,15 @@
+mod 'augeas_core',
+  :git => 'https://github.com/puppetlabs/puppetlabs-augeas_core',
+  :ref => '1.0.3'
+
+mod 'cron_core',
+  :git => 'https://github.com/puppetlabs/puppetlabs-cron_core',
+  :ref => '1.0.0'
+
+mod 'sshkeys_core',
+  :git => 'https://github.com/puppetlabs/puppetlabs-sshkeys_core',
+  :ref => '1.0.1'
+
+mod 'yumrepo_core',
+  :git => 'https://github.com/puppetlabs/puppetlabs-yumrepo_core',
+  :ref => 'd751a380d7aea5ba88b3571a342039dfae3621e4'
diff --git a/functions b/functions
index 78394a223..96531a0cd 100644
--- a/functions
+++ b/functions
@@ -82,6 +82,28 @@ install_modules() {
   fi
 }
 
+# This is only executed from install_modules_unit.sh because we have
+# some modules that is only required for puppet6 unit testing.
+# Uses the following variables:
+#
+# - ``PUPPETFILE_DIR`` must be set to Puppet modules directory
+# - ``SCRIPT_DIR`` must be set to script path
+# - ``ZUUL_BRANCH`` must be set to Zuul branch
+install_modules_unit() {
+  # If zuul-cloner is there, have it install modules using zuul refs
+  if [ -e /usr/zuul-env/bin/zuul-cloner ] ; then
+    csplit ${SCRIPT_DIR}/Puppetfile /'External modules'/ \
+      --prefix ${SCRIPT_DIR}/Puppetfile \
+      --suffix '%d'
+    cat ${SCRIPT_DIR}/Puppetfile_unit >> ${SCRIPT_DIR}/Puppetfile1
+    install_external
+    install_openstack
+  else
+    cat ${SCRIPT_DIR}/Puppetfile_unit >> ${SCRIPT_DIR}/Puppetfile
+    install_all
+  fi
+}
+
 # Write out basic hiera configuration
 #
 # Uses the following variables:
diff --git a/install_modules_unit.sh b/install_modules_unit.sh
index 4602dfddd..25e42503b 100755
--- a/install_modules_unit.sh
+++ b/install_modules_unit.sh
@@ -19,7 +19,7 @@ source $SCRIPT_DIR/functions
 print_header 'Start (install_modules_unit.sh)'
 
 print_header 'Install Modules'
-install_modules
+install_modules_unit
 
 print_header 'Module List'
 puppet module list --modulepath ./spec/fixtures/modules