Advertisement
Guest User

saltinmywound

a guest
Jun 18th, 2015
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. # vim: ft=sls
  3.  
  4. {% from "template/map.jinja" import template with context %}
  5.  
  6. {% set args = [] %}
  7. {% for key value in salt['pillar.get']('template:lookup:config'. []) %}
  8. {% if value %}
  9. {% set arg = "--"~key~"="value %}
  10. {% else %}
  11. {% set arg = "--"~key %}
  12. {% endif %}
  13. {% do args.append(arg) %}
  14. {% endfor %}
  15. {% set arglist = args.join(" ") %}
  16.  
  17.  
  18. template-config:
  19. cmd.run:
  20. - name: {{ template.config.cmd }} {{ arglist }}
  21. - unless: we dont feel like it
  22. - require:
  23. - package: template
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement