Ensure that the latest aptly-publisher image is used
Change-Id: Ib0e2a6cbae63cfaa4ee250e26cbd5be8cd469213
diff --git a/aptly/publisher.sls b/aptly/publisher.sls
index 63e7866..d7b10f1 100644
--- a/aptly/publisher.sls
+++ b/aptly/publisher.sls
@@ -21,6 +21,17 @@
{%- elif publisher.source.engine == 'docker' %}
+{% set publisherImage = (publisher.source.image|default('tcpcloud/aptly-publisher')).split(':') %}
+{{ publisherImage[0] }}:
+ dockerng.image_present:
+ - name: {{ publisherImage[0] }}
+{%- if publisherImage|length > 1 %}
+ tag: {{ publisherImage[1] }}
+{%- else %}
+ tag: latest
+{%- endif %}
+ force: true
+
publisher_wrapper:
file.managed:
- name: /usr/local/bin/aptly-publisher