updated provision state
This commit is contained in:
parent
89679ac179
commit
7b7d96eac5
@ -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
|
||||||
|
9
states/provision/grains.sls
Normal file
9
states/provision/grains.sls
Normal 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 %}
|
@ -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 %}
|
|
||||||
|
15
states/provision/schedule.sls
Normal file
15
states/provision/schedule.sls
Normal 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
|
Loading…
Reference in New Issue
Block a user