blob: f0cc322ba15a17b8c36684614bc8102247358d71 [file] [log] [blame]
Richard Felkl2e07d652018-01-19 10:19:06 +01001{%- from "linux/map.jinja" import system with context %}
2{%- if system.enabled %}
3
4{%- for file_name, file in system.file.iteritems() %}
5
6{{ file_name }}:
7 file.managed:
8 {%- if file.source is defined %}
9 - source: {{ file.source }}
10 {%- endif %}
11 {%- if file.contents is defined %}
12 - contents: {{ file.contents }}
13 {%- endif %}
Bruno Binetb0bc29e2018-02-02 17:16:26 +010014 {%- if file.contents_pillar is defined %}
15 - contents_pillar: {{ file.contents_pillar }}
16 {%- endif %}
Richard Felkl2e07d652018-01-19 10:19:06 +010017 - makedirs: {{ file.get('makedirs', 'True') }}
18 - user: {{ file.get('user', 'root') }}
19 - group: {{ file.get('group', 'root') }}
20 {%- if file.file_mode is defined %}
21 - file_mode: {{ file.file_mode }}
22 {%- endif %}
23 {%- if file.dir_mode is defined %}
24 - dir_mode: {{ file.dir_mode }}
25 {%- endif %}
26 {%- if file.encoding is defined %}
27 - encoding: {{ file.encoding }}
28 {%- endif %}
29 {%- if file.hash is defined %}
30 - source_hash: {{ file.hash }}
31 {%- else %}
32 - skip_verify: True
33 {%- endif %}
34
35{%- endfor %}
36
Bruno Binetb0bc29e2018-02-02 17:16:26 +010037{%- endif %}