Vasyl Saienko | d700598 | 2017-04-26 13:58:15 +0300 | [diff] [blame] | 1 | {%- from "tftpd_hpa/map.jinja" import server with context %} |
| 2 | {%- set opts = [] %} |
| 3 | {%- for data in server.get('options', []) %} |
| 4 | {%- if data is mapping %} |
| 5 | {%- for opt, val in data.iteritems() %} |
| 6 | {%- do opts.append('--' + opt + ' ' + val) %} |
| 7 | {%- endfor %} |
| 8 | {%- else %} |
| 9 | {%- do opts.append("--" + data) %} |
| 10 | {%- endif %} |
| 11 | {%- endfor -%} |
| 12 | TFTP_USERNAME="{{ server.username }}" |
| 13 | TFTP_DIRECTORY="{{ server.path }}" |
| 14 | TFTP_ADDRESS="{{ server.bind.address }}:{{ server.bind.port }}" |
| 15 | TFTP_OPTIONS="{{ ' '.join(opts) }}" |