| {%- from "tftpd_hpa/map.jinja" import server with context %} |
| {%- if server.enabled %} |
| |
| tftpd_hpa_package: |
| 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 }} |
| |
| {{ server.path }}: |
| file.directory: |
| - makedirs: True |
| - name: {{ server.path }} |
| - user: {{ server.username }} |
| |
| {%- endif %} |