mirror of
https://github.com/saltstack-formulas/cron-formula.git
synced 2025-07-21 17:24:35 +02:00
fix(saltcheck): update for cron
instead of cron_settings
This commit is contained in:
parent
8845b3c50f
commit
26cfa4f6c4
@ -1,10 +1,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: ft=sls
|
# vim: ft=sls
|
||||||
|
|
||||||
{%- from "cron/saltcheck-tests/map.jinja" import cron_settings with context %}
|
{%- from "cron/saltcheck-tests/map.jinja" import cron with context %}
|
||||||
|
|
||||||
{%- if 'tasks' in cron_settings %}
|
{%- if 'tasks' in cron %}
|
||||||
{%- for task,task_options in cron_settings.tasks.items() %}
|
{%- for task,task_options in cron.tasks.items() %}
|
||||||
|
|
||||||
{%- if task_options.type == 'present' %}
|
{%- if task_options.type == 'present' %}
|
||||||
validate_cron.{{ task }}_exists:
|
validate_cron.{{ task }}_exists:
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: ft=sls
|
# vim: ft=sls
|
||||||
|
|
||||||
{%- from "cron/saltcheck-tests/map.jinja" import cron_settings with context %}
|
{%- from "cron/saltcheck-tests/map.jinja" import cron with context %}
|
||||||
|
|
||||||
verify_cron.install:
|
verify_cron.install:
|
||||||
module_and_function: pkg.version
|
module_and_function: pkg.version
|
||||||
args:
|
args:
|
||||||
- {{ cron_settings.pkg }}
|
- {{ cron.pkg }}
|
||||||
assertion: assertNotEmpty
|
assertion: assertNotEmpty
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# vim: ft=sls
|
# vim: ft=sls
|
||||||
|
|
||||||
{%- from "cron/saltcheck-tests/map.jinja" import cron_settings with context %}
|
{%- from "cron/saltcheck-tests/map.jinja" import cron with context %}
|
||||||
|
|
||||||
cron.service:
|
cron.service:
|
||||||
{%- if 'enabled' not in cron_settings or ( 'enabled' in cron_settings and cron_settings.enabled ) %}
|
{%- if 'enabled' not in cron or ( 'enabled' in cron and cron.enabled ) %}
|
||||||
service.running:
|
service.running:
|
||||||
- name: {{ cron_settings.service }}
|
- name: {{ cron.service }}
|
||||||
- enable: True
|
- enable: True
|
||||||
{%- else %}
|
{%- else %}
|
||||||
service.dead:
|
service.dead:
|
||||||
- name: {{ cron_settings.service }}
|
- name: {{ cron.service }}
|
||||||
- enable: False
|
- enable: False
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user