Merge "Enable defining 'auth_encryption_key' param in pillar   - update test pillars   - update dependencies for queens testing"
diff --git a/.kitchen.yml b/.kitchen.yml
index 362bd1d..95a13d8 100644
--- a/.kitchen.yml
+++ b/.kitchen.yml
@@ -18,6 +18,9 @@
     - name: keystone
       repo: git
       source: https://github.com/salt-formulas/salt-formula-keystone
+    - name: oslo_templates
+      repo: git
+      source: https://github.com/salt-formulas/salt-formula-oslo-templates
   state_top:
     base:
       "*":
diff --git a/README.rst b/README.rst
index 430939d..cfe9182 100644
--- a/README.rst
+++ b/README.rst
@@ -82,6 +82,16 @@
             port: 5000
             insecure: false
 
+Server with auth_encryption_key defined:
+
+.. code-block:: yaml
+
+    heat:
+      server:
+        ....
+        server.auth_encryption_key: "KeyToEncrypt-hasToBeExact32Chars"
+        ....
+
 Enable CORS parameters:
 
 .. code-block:: yaml
diff --git a/heat/files/ocata/heat.conf.Debian b/heat/files/ocata/heat.conf.Debian
index d949481..3978230 100644
--- a/heat/files/ocata/heat.conf.Debian
+++ b/heat/files/ocata/heat.conf.Debian
@@ -257,7 +257,9 @@
 
 # Key used to encrypt authentication info in the database. Length of this key
 # must be 32 characters. (string value)
-#auth_encryption_key = notgood but just long enough i t
+{%- if server.auth_encryption_key is defined %}
+auth_encryption_key = "{{ server.auth_encryption_key }}"
+{%- endif %}
 
 #
 # From heat.common.wsgi
diff --git a/heat/files/pike/heat.conf.Debian b/heat/files/pike/heat.conf.Debian
index 95db173..cec6af8 100644
--- a/heat/files/pike/heat.conf.Debian
+++ b/heat/files/pike/heat.conf.Debian
@@ -257,7 +257,9 @@
 
 # Key used to encrypt authentication info in the database. Length of this key
 # must be 32 characters. (string value)
-#auth_encryption_key = notgood but just long enough i t
+{%- if server.auth_encryption_key is defined %}
+auth_encryption_key = "{{ server.auth_encryption_key }}"
+{%- endif %}
 
 #
 # From heat.common.wsgi
diff --git a/heat/files/queens/heat.conf.Debian b/heat/files/queens/heat.conf.Debian
index a392c59..55faaa2 100644
--- a/heat/files/queens/heat.conf.Debian
+++ b/heat/files/queens/heat.conf.Debian
@@ -273,7 +273,9 @@
 
 # Key used to encrypt authentication info in the database. Length of this key
 # must be 32 characters. (string value)
-#auth_encryption_key = notgood but just long enough i t
+{%- if server.auth_encryption_key is defined %}
+auth_encryption_key = "{{ server.auth_encryption_key }}"
+{%- endif %}
 
 #
 # From heat.common.wsgi
diff --git a/metadata.yml b/metadata.yml
index aaf139d..d4be702 100644
--- a/metadata.yml
+++ b/metadata.yml
@@ -4,3 +4,6 @@
 dependencies:
 - name: keystone
   source: "https://github.com/salt-formulas/salt-formula-keystone"
+dependencies:
+- name: oslo_templates
+  source: "https://github.com/salt-formulas/salt-formula-oslo-templates"
\ No newline at end of file
diff --git a/tests/pillar/server_cluster.sls b/tests/pillar/server_cluster.sls
index 9e1693a..2cb36a2 100644
--- a/tests/pillar/server_cluster.sls
+++ b/tests/pillar/server_cluster.sls
@@ -2,7 +2,7 @@
   server:
     enabled: true
     region: RegionOne
-    version: liberty
+    version: queens
     stack_domain_admin:
       name: heat_domain_admin
       password: password
diff --git a/tests/pillar/server_plugin_dirs.sls b/tests/pillar/server_plugin_dirs.sls
index 5617308..d96fac7 100644
--- a/tests/pillar/server_plugin_dirs.sls
+++ b/tests/pillar/server_plugin_dirs.sls
@@ -2,7 +2,7 @@
   server:
     enabled: true
     region: RegionOne
-    version: liberty
+    version: ocata
     stack_domain_admin:
       name: heat_domain_admin
       password: password
diff --git a/tests/pillar/server_single.sls b/tests/pillar/server_single.sls
index 669534c..73b683f 100644
--- a/tests/pillar/server_single.sls
+++ b/tests/pillar/server_single.sls
@@ -2,7 +2,8 @@
   server:
     enabled: true
     region: RegionOne
-    version: liberty
+    version: pike
+    auth_encryption_key: "KeyToEncrypt-hasToBeExact32Charz"
     stack_domain_admin:
       name: heat_domain_admin
       password: password