docs: def build_module(self, module, loglevel=logging.DEBUG):
  		"""Build passed-in module.
  		"""
  		shutit_global.shutit_global_object.yield_to_draw()
  		cfg = self.cfg
  		self.log('Building ShutIt module: ' + module.module_id + ' with run order: ' + str(module.run_order), level=logging.INFO)
  		self.build['report'] = (self.build['report'] + '\nBuilding ShutIt module: ' + module.module_id + ' with run order: ' + str(module.run_order))
  		if not module.build(self):
  			self.fail(module.module_id + ' failed on build', shutit_pexpect_child=self.get_shutit_pexpect_session_from_id('target_child').pexpect_child) # pragma: no cover
  		else:
  			if self.build['delivery'] in ('docker','dockerfile'):
  				# Create a directory and files to indicate this has been built.
  				self.send(' command mkdir -p ' + shutit_global.shutit_global_object.shutit_state_dir_build_db_dir + '/module_record/' + module.module_id + ' && command touch ' + shutit_global.shutit_global_object.shutit_state_dir_build_db_dir + '/module_record/' + module.module_id + '/built && command rm -f ' + shutit_global.shutit_global_object.shutit_state_dir_build_db_dir + '/module_record/' + module.module_id + '/removed', loglevel=loglevel, echo=False)
  			# Put it into "installed" cache
  			self.get_current_shutit_pexpect_session_environment().modules_installed.append(module.module_id)
  			# Remove from "not installed" cache
  			if module.module_id in self.get_current_shutit_pexpect_session_environment().modules_not_installed:
  				self.get_current_shutit_pexpect_session_environment().modules_not_installed.remove(module.module_id)
  		self.pause_point('\nPausing to allow inspect of build for: ' + module.module_id, print_input=True, level=2)
  		self.build['report'] = (self.build['report'] + '\nCompleted module: ' + module.module_id)
  		if cfg[module.module_id]['shutit.core.module.tag']:
  			self.log(self.build_report('#Module:' + module.module_id), level=logging.DEBUG)
  		if not cfg[module.module_id]['shutit.core.module.tag'] and shutit_global.shutit_global_object.interactive >= 2:
  			shutit_global.shutit_global_object.shutit_print("\n\nDo you want to save state now we\'re at the " + "end of this module? (" + module.module_id + ") (input y/n)")
  			cfg[module.module_id]['shutit.core.module.tag'] = (shutit_util.util_raw_input(default='y') == 'y')
  		if cfg[module.module_id]['shutit.core.module.tag'] or self.build['tag_modules']:
  			self.log(module.module_id + ' configured to be tagged, doing repository work',level=logging.INFO)
  			# Stop all before we tag to avoid file changing errors, and clean up pid files etc..
  			self.stop_all(module.run_order)
  			self.do_repository_work(str(module.module_id) + '_' + str(module.run_order), password=self.host['password'], docker_executable=self.host['docker_executable'], force=True)
  			# Start all after we tag to ensure services are up as expected.
  			self.start_all(module.run_order)
  		if shutit_global.shutit_global_object.interactive >= 2:
  			shutit_global.shutit_global_object.shutit_print("\n\nDo you want to stop interactive mode? (input y/n)\n")
  			if shutit_util.util_raw_input(default='y') == 'y':
  				shutit_global.shutit_global_object.interactive = 0