Introduce ugly workaround to provision user
diff --git a/gerrit/client/service.sls b/gerrit/client/service.sls
index a9b0a7d..b2678d4 100644
--- a/gerrit/client/service.sls
+++ b/gerrit/client/service.sls
@@ -38,6 +38,18 @@
   - source: salt://gerrit/files/_gerrit.conf
   - template: jinja
 
+{%- if client.get('try_login', False) %}
+{#-
+  Ugly workaround to provision user which is possible only over web UI
+  See https://groups.google.com/forum/#!topic/repo-discuss/I0SiBjbaojk
+#}
+gerrit_try_login:
+  cmd.wait:
+    - name: curl -svr -X POST --data "username={{ client.server.user }}&password={{ client.server.password }}" {{ client.server.protocol|default('http') }}://{{ client.server.host }}:{{ client.server.http_port|default(80) }}/login
+    - watch:
+      - file: /etc/salt/minion.d/_gerrit.conf
+{%- endif %}
+
 /etc/github/github-projects.secure.config:
   file.managed:
   - source: salt://gerrit/files/github-projects.secure.config
diff --git a/gerrit/map.jinja b/gerrit/map.jinja
index 375eb16..310f9ee 100644
--- a/gerrit/map.jinja
+++ b/gerrit/map.jinja
@@ -22,6 +22,7 @@
     - python-gerritlib
     - python-pygerrit
     - jeepyb
+    - curl
   dir:
     base: /usr/share/jeepyb
     acls: /srv/jeepyb/acls