From b3e56b081aaf2332ea86c470abfb4dfbc4a48753 Mon Sep 17 00:00:00 2001
From: baigk <baiguoku@huawei.com>
Date: Tue, 2 Feb 2016 19:22:04 +0800
Subject: [PATCH] modify the file parameter of cheetah from string to file
 object

Change-Id: I48081db922adcbdc319d39e73af43aaa480342e1
Signed-off-by: baigk <baiguoku@huawei.com>
---
 .../pk_installers/ansible_installer/ansible_installer.py        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compass/deployment/installers/pk_installers/ansible_installer/ansible_installer.py b/compass/deployment/installers/pk_installers/ansible_installer/ansible_installer.py
index 45961f9d..345f4e0c 100644
--- a/compass/deployment/installers/pk_installers/ansible_installer/ansible_installer.py
+++ b/compass/deployment/installers/pk_installers/ansible_installer/ansible_installer.py
@@ -254,7 +254,7 @@ class AnsibleInstaller(PKInstaller):
         searchList.append(copy_vars_dict)
 
         # Load specific template for current adapter
-        tmpl = Template(file=tmpl_path, searchList=searchList)
+        tmpl = Template(file=open(tmpl_path, "r"), searchList=searchList)
         return tmpl.respond()
 
     def _create_ansible_run_env(self, env_name, ansible_run_destination):