Fix ordering for API tasks

Ensure site is added before restarting apache,
Ensure manila-api service is dead before restarting apache

Change-Id: I7e10ec38bb04d0ed8dd8a11c7b79d59efed94189
diff --git a/manila/api.sls b/manila/api.sls
index 2ab8acf..6f78c13 100644
--- a/manila/api.sls
+++ b/manila/api.sls
@@ -23,6 +23,10 @@
   - name: manila-api
   - enable: False
 
+manila_site_enabled:
+  apache_site.enabled:
+    - name: wsgi_manila
+
 {{ api.service }}:
   service.running:
     - enable: true
@@ -32,6 +36,9 @@
     {%- if grains.get('noservices') %}
     - onlyif: /bin/false
     {%- endif %}
+    - require:
+      - manila_api_service_dead
+      - manila_site_enabled
 
 /etc/manila/policy.json:
   file.managed:
@@ -40,8 +47,4 @@
   - require:
     - pkg: manila_api_packages
 
-manila_site_enabled:
-  apache_site.enabled:
-    - name: wsgi_manila
-
 {%- endif %}