Browse Source

add grains state to base

master
Sean Johnson 8 months ago
parent
commit
de1a3f7d58
  1. 16
      base/grains.sls
  2. 1
      top.sls

16
base/grains.sls

@ -0,0 +1,16 @@
---
{% set current_node = salt["nodemeta.current_node"]() or {} %}
{% for key, value in current_node.iteritems() %}
{{ key|yaml_dquote }}:
grains.present:
- value: {{ value|yaml_dquote }}
- onchanges_in:
- module: saltutil.refresh_grains
{% endfor %}
saltutil.refresh_grains:
module.run:
- saltutil.refresh_grains:
- refresh_pillar: false

1
top.sls

@ -6,6 +6,7 @@ base:
- app.letsencrypt
- base.files
- base.cron
- base.grains
- base.repositories
- base.packages
- base.python

Loading…
Cancel
Save