Make sure api is enabled before running db sync

PROD-34439

Change-Id: I4ac0fc5c3ec0b87100776782528ac94b1ae7a20c
diff --git a/octavia/db/offline_sync.sls b/octavia/db/offline_sync.sls
index 272ef86..b238b2c 100644
--- a/octavia/db/offline_sync.sls
+++ b/octavia/db/offline_sync.sls
@@ -1,8 +1,10 @@
 {%- from "octavia/map.jinja" import api with context %}
 
+{%- if api.get('enabled', False) %}
 octavia_db_manage:
   cmd.run:
   - name: octavia-db-manage --config-file /etc/octavia/octavia_api.conf upgrade head
   {%- if grains.get('noservices') or api.get('role', 'primary') == 'secondary' %}
   - onlyif: /bin/false
   {%- endif %}
+{%- endif %}