Change-Id: Ida91f545cc705457d1bc567fbee483e14a202a3apull/128/head
@@ -328,6 +328,19 @@ Systemd settings: | |||
DefaultLimitCPU: 2 | |||
DefaultLimitNPROC: 4 | |||
Ensure presence of directory: | |||
.. code-block:: yaml | |||
linux: | |||
system: | |||
directory: | |||
/tmp/test: | |||
user: root | |||
group: root | |||
mode: 700 | |||
makedirs: true | |||
Kernel | |||
~~~~~~ | |||
@@ -0,0 +1,15 @@ | |||
{%- from "linux/map.jinja" import system with context %} | |||
{%- for name, dir in system.directory.iteritems() %} | |||
{{ dir.name|default(name) }}: | |||
file.directory: | |||
{%- if dir %} | |||
{%- for key, value in dir.iteritems() %} | |||
- {{ key }}: {{ value }} | |||
{%- endfor %} | |||
{%- else %} | |||
- name: {{ name }} | |||
{%- endif %} | |||
{%- endfor %} |
@@ -96,3 +96,6 @@ include: | |||
{%- if system.systemd is defined %} | |||
- linux.system.systemd | |||
{%- endif %} | |||
{%- if system.directory is defined %} | |||
- linux.system.directory | |||
{%- endif %} |
@@ -7,6 +7,9 @@ linux: | |||
environment: prd | |||
hostname: system.pillar.local | |||
purge_repos: true | |||
directory: | |||
/tmp/test: | |||
makedirs: true | |||
apparmor: | |||
enabled: false | |||
haveged: |