blob: a022d18db072f21d038f4150aacbf6c969c7a230 [file] [log] [blame]
Ales Komarekb08b9cd2014-09-08 16:01:03 +02001{%- from "tftpd_hpa/map.jinja" import server with context %}
2{%- if server.enabled %}
3
4tftpd_hpa_package:
5 pkg.installed:
6 - pkgs: {{ server.pkgs }}
7
Vasyl Saienkod7005982017-04-26 13:58:15 +03008{{ server.config_file }}:
9 file.managed:
10 - name: {{ server.config_file }}
11 source: salt://tftpd_hpa/files/tftpd-hpa.conf
12 template: jinja
13
Ales Komarekb08b9cd2014-09-08 16:01:03 +020014tftpd_hpa_service:
15 service.running:
16 - name: {{ server.service }}
Ales Komarek030a8072014-09-09 15:36:17 +020017 - enable: true
Ales Komarekb08b9cd2014-09-08 16:01:03 +020018 - running: true
Vasyl Saienkod7005982017-04-26 13:58:15 +030019 - watch:
20 - file: {{ server.config_file }}
Ales Komarekb08b9cd2014-09-08 16:01:03 +020021
Vasyl Saienkod7005982017-04-26 13:58:15 +030022{{ server.path }}:
23 file.directory:
24 - makedirs: True
25 - name: {{ server.path }}
26 - user: {{ server.username }}
27
28{%- endif %}