salt.minion, salt.master switch to pkg.installed

Currently the CI job fails with module not found errror.
AttributeError: 'module' object has no attribute 'check_refresh

The reason is new version of salt tries to call
salt.utils.pkg.check_refresh which is not available in 2016.11.3 but is
available in 2016.11.6.
Reference:
1. https://github.com/saltstack/salt/blob/v2016.11.3/salt/states/pkg.py
2. https://github.com/saltstack/salt/blob/v2016.11.6/salt/states/pkg.py#L1819

The fix proposed here is to use pkg.installed instead of pkg.latest.
It's not a good idea to always update salt whenever the salt state is
run, this may introduce failures unknown to the user. There is a pipeline
to update packages which should be used for updating to latest.
pkg.latest generally isn't a good way to write idempotent formulas. See
official salt docs: "Generally it is better for the installed function
to be used, as latest will update the package whenever a new package is
available."

Change-Id: I8da5c36c1613e54768993080f2514afc920c49f8
diff --git a/.kitchen.yml b/.kitchen.yml
index bfcf829..776e756 100644
--- a/.kitchen.yml
+++ b/.kitchen.yml
@@ -17,7 +17,7 @@
     noservices: true
   vendor_repo:
     - type: apt
-      url: http://apt-mk.mirantis.com/trusty
+      url: http://apt-mk.mirantis.com/xenial
       key_url: http://apt-mk.mirantis.com/public.gpg
       components: salt
       distribution: testing
@@ -60,21 +60,7 @@
       image: <%=ENV['PLATFORM'] || 'trevorj/salty-whales:xenial'%>
       platform: ubuntu
 
-#  - name: ubuntu-xenial
-#    driver_config:
-#      image: trevorj/salty-whales:xenial
-#      platform: ubuntu
-
-#  - name: debian-jessie
-#    driver_config:
-#      image: debian:jessie
-
-#  - name: debian-stretch
-#    driver_config:
-#      image: debian:stretch
-
 suites:
-
   - name: minion-default
     provisioner:
       pillars:
@@ -144,17 +130,4 @@
         salt.sls: tests/pillar/minion_multi_master_failover.sls
 
 
-#  - name: minion-local
-#    provisioner:
-#      pillars:
-#        top.sls:
-#          base:
-#            "*":
-#              - common
-#              - minion_local_pillar
-#              - minion_local_reclass
-#      pillars-from-files:
-#        minion_local_pillar.sls: tests/pillar/minion_local_pillar.sls
-#        minion_local_reclass.sls: tests/pillar/minion_local_reclass.sls
-
   # vim: ft=yaml sw=2 ts=2 sts=2 tw=125
diff --git a/salt/master/service.sls b/salt/master/service.sls
index 3ca6d1c..85f7eb5 100644
--- a/salt/master/service.sls
+++ b/salt/master/service.sls
@@ -4,7 +4,7 @@
 {%- if master.source.get('engine', 'pkg') == 'pkg' %}
 
 salt_master_packages:
-  pkg.latest:
+  pkg.installed:
   - names: {{ master.pkgs }}
   {%- if master.source.version is defined %}
   - version: {{ master.source.version }}
diff --git a/salt/minion/service.sls b/salt/minion/service.sls
index 999ea68..cbcec0f 100644
--- a/salt/minion/service.sls
+++ b/salt/minion/service.sls
@@ -4,7 +4,7 @@
 {%- if minion.source.get('engine', 'pkg') == 'pkg' %}
 
 salt_minion_packages:
-  pkg.latest:
+  pkg.installed:
   - names: {{ minion.pkgs }}
   {%- if minion.source.version is defined %}
   - version: {{ minion.source.version }}