fixes
diff --git a/horizon/server/plugin.sls b/horizon/server/plugin.sls
index 6d499a8..309b34f 100644
--- a/horizon/server/plugin.sls
+++ b/horizon/server/plugin.sls
@@ -1,14 +1,6 @@
{%- from "horizon/map.jinja" import server with context %}
{%- if server.enabled %}
-{%- if grains.os == "Ubuntu" %}
-
-horizon_ubuntu_theme_absent:
- pkg.purged:
- - name: openstack-dashboard-ubuntu-theme
-
-{%- endif %}
-
{%- for plugin_name, plugin in server.get('plugin', {}).iteritems() %}
horizon_{{ plugin_name }}_package:
@@ -16,7 +8,19 @@
- name: {{ plugin.source.name }}
- watch_in:
- service: horizon_services
+ {%- if grains.os == "Ubuntu" %}
+ - require:
+ - pkg: horizon_ubuntu_theme_absent
+ {%- endif %}
{%- endfor %}
+{%- if grains.os == "Ubuntu" %}
+
+horizon_ubuntu_theme_absent:
+ pkg.purged:
+ - name: openstack-dashboard-ubuntu-theme
+
+{%- endif %}
+
{%- endif %}
\ No newline at end of file