Ironic run dbsync only if api type is public

During multinode deploy it was observed that during ironic api
salt state execution the DB was installed on 2 hosts simultaneously -
ctl01 node and bmt01 node which resulted in deploy job failure.
In order to avoid that api.sls was modified so that dbsync is
invoked only if pillar value of api_type is public

Change-Id: I7c3d1de3cb0d2a7bb8405b837709a7b4656bcca5
Related-PROD: PROD-18977
diff --git a/ironic/api.sls b/ironic/api.sls
index 8433c7d..dcf247d 100644
--- a/ironic/api.sls
+++ b/ironic/api.sls
@@ -8,12 +8,14 @@
   - names: {{ api.pkgs }}
   - install_recommends: False
 
+{%- if api.api_type not in ["deploy"] %}
 ironic_install_database:
   cmd.run:
   - names:
     - ironic-dbsync --config-file /etc/ironic/ironic.conf upgrade
   - require:
     - file: /etc/ironic/ironic.conf
+{%- endif %}
 
 {{ api.service }}:
   service.running: