Replace /etc/aptly-publisher.yaml -> /etc/aptly/publisher.yaml

Closes bug: PROD-20498

Change-Id: I2e4100fc8d65079d9174de1481e8f2732183df3b
diff --git a/aptly/files/aptly-publisher b/aptly/files/aptly-publisher
index a8934f6..6c3594d 100755
--- a/aptly/files/aptly-publisher
+++ b/aptly/files/aptly-publisher
@@ -8,7 +8,6 @@
 #
 # This script will attempt to mirror the host paths by using volumes for the
 # following paths:
-#   * /etc/aptly-publisher.yaml
 #   * /etc/aptly
 #   * $(pwd)
 #   * $HOME if it's set
@@ -38,10 +37,6 @@
     VOLUMES="-v $(pwd):$(pwd)"
 fi
 
-if [ -e /etc/aptly-publisher.yaml ]; then
-    VOLUMES="-v /etc/aptly-publisher.yaml:/etc/aptly-publisher.yaml:ro"
-fi
-
 if [ -d /etc/aptly ]; then
     VOLUMES="-v /etc/aptly:/etc/aptly:ro"
 fi
diff --git a/aptly/files/aptly_publish_update.sh b/aptly/files/aptly_publish_update.sh
index 5e2c341..4441d82 100644
--- a/aptly/files/aptly_publish_update.sh
+++ b/aptly/files/aptly_publish_update.sh
@@ -44,7 +44,7 @@
 fi
 
 URL=${URL:-"http://127.0.0.1:8080"}
-aptly-publisher --timeout=1200 publish -v -c /etc/aptly-publisher.yaml --url ${URL} --architectures amd64 $PUBLISHER_OPTIONS
+aptly-publisher --timeout=1200 publish -v -c /etc/aptly/publisher.yaml --url ${URL} --architectures amd64 $PUBLISHER_OPTIONS
 
 if [[ $? -ne 0 ]]; then
     echo "Aptly Publisher failed."
diff --git a/aptly/publisher.sls b/aptly/publisher.sls
index f11dcfd..1cede8d 100644
--- a/aptly/publisher.sls
+++ b/aptly/publisher.sls
@@ -59,11 +59,12 @@
 
 publisher_yaml:
   file.managed:
-  - name: /etc/aptly-publisher.yaml
+  - name: /etc/aptly/publisher.yaml
   - source: salt://aptly/files/aptly-publisher.yaml
   - template: jinja
   - user: root
   - group: root
   - mode: 664
+  - makedirs: True
 
 {% endif %}