mirror of
https://github.com/saltstack-formulas/cron-formula.git
synced 2025-02-19 19:28:44 +01: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 -*-
|
||||
# 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 %}
|
||||
{%- for task,task_options in cron_settings.tasks.items() %}
|
||||
{%- if 'tasks' in cron %}
|
||||
{%- for task,task_options in cron.tasks.items() %}
|
||||
|
||||
{%- if task_options.type == 'present' %}
|
||||
validate_cron.{{ task }}_exists:
|
||||
|
@ -1,10 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# 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:
|
||||
module_and_function: pkg.version
|
||||
args:
|
||||
- {{ cron_settings.pkg }}
|
||||
- {{ cron.pkg }}
|
||||
assertion: assertNotEmpty
|
||||
|
@ -1,15 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# 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:
|
||||
{%- 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:
|
||||
- name: {{ cron_settings.service }}
|
||||
- name: {{ cron.service }}
|
||||
- enable: True
|
||||
{%- else %}
|
||||
service.dead:
|
||||
- name: {{ cron_settings.service }}
|
||||
- name: {{ cron.service }}
|
||||
- enable: False
|
||||
{%- endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user