updated provision state

This commit is contained in:
Paul 2023-02-19 12:21:44 +01:00
parent 89679ac179
commit 7b7d96eac5
4 changed files with 29 additions and 25 deletions

View File

@ -11,5 +11,5 @@ specs:
lb: false lb: false
provision: provision:
highstate_interval: 30 highstate_interval_minutes: 20
clear_cache_interval: 7 clear_cache_interval_days: 30

View File

@ -0,0 +1,9 @@
---
{%- from "provision/map.jinja" import specs with context %}
{% for key, value in specs.items() %}
grains-{{ key }}:
grains.present:
- name: {{ key }}
- value: {{ value }}
- force: true
{% endfor %}

View File

@ -1,24 +1,4 @@
--- ---
{%- from "provision/map.jinja" import provision with context %} include:
{%- from "provision/map.jinja" import specs with context %} - .schedule
schedule_highstate: - .grains
schedule.present:
- name: schedule_highstate
- function: state.highstate
- minutes: {{ provision.highstate_interval }}
- run_on_start: false
schedule_saltutil_clear_cache:
schedule.present:
- name: schedule_saltutil_clear_cache
- function: saltutil.clear_cache
- days: {{ provision.clear_cache_interval }}
- run_on_start: false
{% for key, value in specs.items() %}
grains-{{ key }}:
grains.present:
- name: {{ key }}
- value: {{ value }}
- force: true
{% endfor %}

View File

@ -0,0 +1,15 @@
---
{%- from "provision/map.jinja" import provision with context %}
schedule_highstate:
schedule.present:
- name: schedule_highstate
- function: state.highstate
- minutes: {{ provision.highstate_interval_minutes }}
- run_on_start: false
schedule_saltutil_clear_cache:
schedule.absent:
- name: schedule_saltutil_clear_cache
- function: saltutil.clear_cache
- days: {{ provision.clear_cache_interval_days }}
- run_on_start: false