Allow to update tftpd configuration
This patch reworks tftpd-hpa module to allow specify tftpd
configuration options like:
username, directory, options
Change-Id: I4fbaa9a4149ca230008099aa29834a8f9de6449b
diff --git a/tftpd_hpa/server.sls b/tftpd_hpa/server.sls
index eb716d3..a022d18 100644
--- a/tftpd_hpa/server.sls
+++ b/tftpd_hpa/server.sls
@@ -5,10 +5,24 @@
pkg.installed:
- pkgs: {{ server.pkgs }}
+{{ server.config_file }}:
+ file.managed:
+ - name: {{ server.config_file }}
+ source: salt://tftpd_hpa/files/tftpd-hpa.conf
+ template: jinja
+
tftpd_hpa_service:
service.running:
- name: {{ server.service }}
- enable: true
- running: true
+ - watch:
+ - file: {{ server.config_file }}
-{%- endif %}
\ No newline at end of file
+{{ server.path }}:
+ file.directory:
+ - makedirs: True
+ - name: {{ server.path }}
+ - user: {{ server.username }}
+
+{%- endif %}