Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###### my pillar file:
- config:
- ntpservers:
- server1:
- ip: '192.168.0.253'
- details: 'details xxx'
- server2:
- ip: '192.168.0.253'
- details: 'details xxx'
- ##### my state:
- {% if 'config' in pillar and 'ntpservers' in pillar['config'] %}
- {% for v in pillar.get('config:ntpservers', {}).items() %}
- test-file--{{ v }}:
- file.managed:
- - name: /root/delete_me__{{ v.ip }}
- - source: salt://app/all/touch_salt.conf
- - template: jinja
- - user: root
- - group: root
- - mode: 644
- {% endfor %}
- {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement