|
|
@@ -4,12 +4,16 @@ |
|
|
|
{%- for file_name, file in system.file.items() %} |
|
|
|
|
|
|
|
linux_file_{{ file_name }}: |
|
|
|
{%- if file.serialize is defined %} |
|
|
|
file.serialize: |
|
|
|
- formatter: {{ file.serialize }} |
|
|
|
{%- if file.contents is defined %} |
|
|
|
- dataset: {{ file.contents|yaml }} |
|
|
|
{%- elif file.contents_pillar is defined %} |
|
|
|
- dataset_pillar: {{ file.contents_pillar }} |
|
|
|
{%- endif %} |
|
|
|
{%- else %} |
|
|
|
file.managed: |
|
|
|
{%- if file.name is defined %} |
|
|
|
- name: {{ file.name }} |
|
|
|
{%- else %} |
|
|
|
- name: {{ file_name }} |
|
|
|
{%- endif %} |
|
|
|
{%- if file.source is defined %} |
|
|
|
- source: {{ file.source }} |
|
|
|
{%- if file.hash is defined %} |
|
|
@@ -24,6 +28,12 @@ linux_file_{{ file_name }}: |
|
|
|
{%- elif file.contents_grains is defined %} |
|
|
|
- contents_grains: {{ file.contents_grains }} |
|
|
|
{%- endif %} |
|
|
|
{%- endif %} |
|
|
|
{%- if file.name is defined %} |
|
|
|
- name: {{ file.name }} |
|
|
|
{%- else %} |
|
|
|
- name: {{ file_name }} |
|
|
|
{%- endif %} |
|
|
|
- makedirs: {{ file.get('makedirs', 'True') }} |
|
|
|
- user: {{ file.get('user', 'root') }} |
|
|
|
- group: {{ file.get('group', 'root') }} |