Move cache readiness file into debmirror_present state

Readiness file should be created right after cache creation.

Change-Id: I41b0e27f96a82ff322acd1c7a58c07610efede53
Related-Prod: PROD-32735
diff --git a/_states/debmirror.py b/_states/debmirror.py
index 36e666d..ee86580 100644
--- a/_states/debmirror.py
+++ b/_states/debmirror.py
@@ -186,6 +186,7 @@
             result = __salt__['cmd.run_all'](cmdline, redirect_stderr=True,
                                              env=env_vars)
             if result['retcode'] == 0:
+                __states__['file.managed']('%s/.ready' % cache_dir, replace=False)
                 log2file.debug(result['stdout'])
                 result = __salt__['cmd.run_all'](cpline, redirect_stderr=True,
                                                  cwd=cache_dir, env=env_vars)
diff --git a/debmirror/client/init.sls b/debmirror/client/init.sls
index cdc9699..48386d5 100644
--- a/debmirror/client/init.sls
+++ b/debmirror/client/init.sls
@@ -40,12 +40,6 @@
     - group: root
     - dir_mode: 755
     - makedirs: True
-debmirror_cache_readiness_{{ mirror_name }}:
-  file.managed:
-    - name: '{{ opts.get('cache_dir') }}/.ready'
-    - replace: False
-    - require:
-      - debmirror_{{ mirror_name }}_present
 {%- endif %}
 
 {% endif %}