Change-Id: I9d834d67e29d7c6d0b11599b0b543427cf1d7706pull/73/head
@@ -273,6 +273,17 @@ Pass pillar render error to minion log | |||
master: | |||
pillar_safe_render_error: False | |||
Enable Windows repo support | |||
.. code-block:: yaml | |||
salt: | |||
master: | |||
win_repo: | |||
source: git | |||
address: https://github.com/saltstack/salt-winrepo-ng | |||
revision: master | |||
Event/Reactor Systems | |||
~~~~~~~~~~~~~~~~~~~~~ |
@@ -6,7 +6,7 @@ include: | |||
- salt.master.env | |||
- salt.master.pillar | |||
- salt.master.minion | |||
{%- if pillar.salt.master.windows_repo is defined %} | |||
{%- if pillar.salt.master.win_repo is defined %} | |||
- salt.master.win_repo | |||
{%- endif %} | |||
{%- if pillar.salt.master.ssh is defined %} |
@@ -5,45 +5,28 @@ include: | |||
- git.client | |||
- salt.master.service | |||
{%- if master.windows_repo is defined %} | |||
/srv/salt/win: | |||
file.directory: | |||
- user: root | |||
- mode: 755 | |||
- makedirs: true | |||
- require: | |||
- file: /srv/salt/env | |||
{%- if master.windows_repo.source == 'git' %} | |||
{%- if master.win_repo.source == 'git' %} | |||
{{ master.windows_repo.address }}: | |||
{{ master.win_repo.address }}: | |||
git.latest: | |||
- target: /srv/salt/win/repo | |||
- rev: {{ master.windows_repo.branch }} | |||
- rev: {{ master.win_repo.branch }} | |||
- require: | |||
- file: /srv/salt/win | |||
- pkg: git_packages | |||
salt_master_update_win_repo: | |||
cmd.run: | |||
cmd.wait: | |||
- name: salt-run winrepo.genrepo | |||
- require: | |||
- git: {{ master.windows_repo.address }} | |||
{%- for environment in master.environments %} | |||
/srv/salt/env/{{ name }}/win: | |||
file.symlink: | |||
- target: /srv/salt/win | |||
- require: | |||
- file: /srv/salt/env/{{ name }} | |||
- git: {{ master.windows_repo.address }} | |||
{%- endfor %} | |||
- watch: | |||
- git: {{ master.win_repo.address }} | |||
{%- endif %} | |||
{%- endif %} | |||
{%- endif %} |
@@ -0,0 +1,9 @@ | |||
haproxy_config: | |||
file.managed: | |||
- name: /tmp/haproxy_config | |||
- contents: | | |||
{%- for server, addrs in salt['mine.get']('roles:salt:master', 'grains.items', expr_form='pillar').items() %} | |||
server {{ server }} {{ addrs[0] }}:80 check | |||
{%- endfor %} | |||
- template: jinja |