New version of salt-formula from Saltstack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
927B

  1. {%- from "salt/map.jinja" import master with context %}
  2. {%- if master.enabled %}
  3. include:
  4. - git.client
  5. - salt.master.service
  6. {%- if master.windows_repo is defined %}
  7. /srv/salt/win:
  8. file.directory:
  9. - user: root
  10. - mode: 755
  11. - makedirs: true
  12. - require:
  13. - file: /srv/salt/env
  14. {%- if master.windows_repo.source == 'git' %}
  15. {{ master.windows_repo.address }}:
  16. git.latest:
  17. - target: /srv/salt/win/repo
  18. - rev: {{ master.windows_repo.branch }}
  19. - require:
  20. - file: /srv/salt/win
  21. - pkg: git_packages
  22. salt_master_update_win_repo:
  23. cmd.run:
  24. - name: salt-run winrepo.genrepo
  25. - require:
  26. - git: {{ master.windows_repo.address }}
  27. {%- for environment in master.environments %}
  28. /srv/salt/env/{{ name }}/win:
  29. file.symlink:
  30. - target: /srv/salt/win
  31. - require:
  32. - file: /srv/salt/env/{{ name }}
  33. - git: {{ master.windows_repo.address }}
  34. {%- endfor %}
  35. {%- endif %}
  36. {%- endif %}
  37. {%- endif %}