paulbsd-salt/states/provision/init.sls
Paul Lecuq 1b59cdacdd * Update salt states
- bl module updated
- borg state updated
- config state updated
- netbox state updated
- nginx state updated
- misc updates
2022-02-21 13:52:46 +01:00

26 lines
757 B
Plaintext

---
{%- from "provision/map.jinja" import specs with context %}
schedule_highstate:
schedule.present:
- name: schedule_highstate
- function: state.highstate
- minutes: 30
- run_on_start: false
schedule_saltutil_clear_cache:
schedule.present:
- name: schedule_saltutil_clear_cache
- function: saltutil.clear_cache
- days: 7
- run_on_start: false
{%- if specs.default.items()|length > 0 and salt['grains.get']('id') in specs.keys() %}
{%- for key, value in specs.default.items() %}
{{ key }}:
grains.present:
- name: {{ key }}
- value: {% if specs[salt['grains.get']('id')][key] is defined %}{{ specs[salt['grains.get']('id')][key] }}{% else %}{{ value }}{% endif %}
- force: true
{% endfor %}
{%- endif %}