filter for mirrors

Change-Id: I1ee52c0ef6a6bcca36b2693d34b802ba3e714557
diff --git a/README.rst b/README.rst
index d84ba04..0223a14 100644
--- a/README.rst
+++ b/README.rst
@@ -80,6 +80,7 @@
               awsSecretAccessKey: xxxx
               bucket: test
 
+
 Example pillar
 ==============
 
@@ -100,6 +101,27 @@
                distributions:
                  - nightly/trusty
 
+Basic Aptly server mirrors
+
+.. code-block:: yaml
+
+     aptly:
+       server:
+         mirror:
+           mirror_name:
+             source: http://example.com/debian
+             distribution: xenial
+             components: main
+             architectures: amd64
+             gpgkeys: 460F3999
+             filter: "!(Name (% *-dbg))"
+             publisher:
+               component: example
+               distributions:
+                 - xenial/repo/nightly
+                 - "s3:aptcdn:xenial/repo/nightly"
+
+
 Proxy environment variables (optional) in cron job for mirroring script
 
 .. code-block:: yaml
diff --git a/aptly/server/mirrors.sls b/aptly/server/mirrors.sls
index 5bdb17b..b33b9bf 100644
--- a/aptly/server/mirrors.sls
+++ b/aptly/server/mirrors.sls
@@ -74,7 +74,7 @@
 
 aptly_{{ mirror_name }}_mirror:
   cmd.run:
-  - name: aptly mirror create {% if mirror.get('udebs', False) %}-with-udebs=true {% endif %}{% if mirror.get('sources', False) %}-with-sources=true {% endif %}-architectures={{ mirror.architectures }} {{ mirror_name }} {{ mirror.source }} {{ mirror.distribution }} {{ mirror.components }}
+  - name: aptly mirror create {% if mirror.get('udebs', False) %}-with-udebs=true {% endif %}{% if mirror.get('sources', False) %}-with-sources=true {% endif %}{% if mirror.get('filter') %}-filter="{{ mirror.filter }}" {% endif %}-architectures={{ mirror.architectures }} {{ mirror_name }} {{ mirror.source }} {{ mirror.distribution }} {{ mirror.components }}
   {%- if server.source.engine != "docker" %}
   - user: {{ server.user.name }}
   {%- endif %}