0
0
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:
Imran Iqbal 2019-10-14 14:17:29 +01:00
parent 8845b3c50f
commit 26cfa4f6c4
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819
3 changed files with 9 additions and 9 deletions

View File

@ -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:

View File

@ -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

View File

@ -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 %}