diff --git a/cron/config/file.sls b/cron/config/file.sls index 9e5510f..c5afe32 100644 --- a/cron/config/file.sls +++ b/cron/config/file.sls @@ -9,11 +9,11 @@ {%- for task, task_options in cron.tasks.items() %} cron.{{ task }}: - cron.{{ task_options.type|default('present') }}: + cron.{{ task_options.type|d('present') }}: - name: {{ task_options.name }} - identifier: '{{ task }}' {%- if 'user' in task_options %} - - user: {{ task_options.user|default('root') }} + - user: {{ task_options.user|d('root') }} {%- endif %} {%- for section in ['minute', 'hour', 'daymonth', 'month', 'dayweek', 'comment', 'special'] %} {%- if section in task_options %} diff --git a/cron/saltcheck-tests/config.tst b/cron/saltcheck-tests/config.tst index 2206f55..fe3646e 100644 --- a/cron/saltcheck-tests/config.tst +++ b/cron/saltcheck-tests/config.tst @@ -10,7 +10,7 @@ validate_cron.{{ task }}_absent: module_and_function: cron.get_entry args: - - {{ task_options.user|default('root') }} + - {{ task_options.user|d('root') }} - {{ task }} assertion: assertFalse @@ -18,7 +18,7 @@ validate_cron.{{ task }}_absent: validate_cron.{{ task }}_exists: module_and_function: cron.get_entry args: - - {{ task_options.user|default('root') }} + - {{ task_options.user|d('root') }} - {{ task }} assertion: assertEqual assertion_section: identifier @@ -30,7 +30,7 @@ validate_cron.{{ task }}_exists: validate_cron.{{ task }}_{{ section }}: module_and_function: cron.get_entry args: - - {{ task_options.user|default('root') }} + - {{ task_options.user|d('root') }} - {{ task }} assertion: assertEqual assertion_section: {{ section }} @@ -42,7 +42,7 @@ validate_cron.{{ task }}_{{ section }}: validate_cron.{{ task }}_commented: module_and_function: cron.get_entry args: - - {{ task_options.user|default('root') }} + - {{ task_options.user|d('root') }} - {{ task }} assertion: assertTrue assertion_section: commented