stop cron before soup upgrades the manager, start cron at the end. add cron state that is in included in common

This commit is contained in:
m0duspwnens
2022-01-12 16:04:10 -05:00
parent 0cf877f169
commit 03b9b74ace
6 changed files with 38 additions and 1 deletions

6
salt/cron/dead.sls Normal file
View File

@@ -0,0 +1,6 @@
{% from "cron/map.jinja" import cronmap with context %}
crond_service:
service.dead:
- name: {{ cronmap.service }}
- enable: True

8
salt/cron/map.jinja Normal file
View File

@@ -0,0 +1,8 @@
{% set cronmap = salt['grains.filter_by']({
'Ubuntu': {
'service': 'cron',
},
'CentOS': {
'service': 'crond',
},
}) %}

7
salt/cron/running.sls Normal file
View File

@@ -0,0 +1,7 @@
{% from "cron/map.jinja" import cronmap with context %}
crond_service:
service.running:
- name: {{ cronmap.service }}
- enable: True
- unless: pgrep soup