Specify dependencies
This commit is contained in:
parent
9f9bd97f9e
commit
2e1d4c4573
@ -7,6 +7,10 @@ salt-master:
|
|||||||
{%- if salt_settings.version is defined %}
|
{%- if salt_settings.version is defined %}
|
||||||
- version: {{ salt_settings.version }}
|
- version: {{ salt_settings.version }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
- require_in:
|
||||||
|
- service: salt-master
|
||||||
|
- watch_in:
|
||||||
|
- service: salt-master
|
||||||
{% endif %}
|
{% endif %}
|
||||||
file.recurse:
|
file.recurse:
|
||||||
- name: {{ salt_settings.config_path }}/master.d
|
- name: {{ salt_settings.config_path }}/master.d
|
||||||
@ -18,9 +22,6 @@ salt-master:
|
|||||||
- enable: True
|
- enable: True
|
||||||
- name: {{ salt_settings.master_service }}
|
- name: {{ salt_settings.master_service }}
|
||||||
- watch:
|
- watch:
|
||||||
{% if salt_settings.install_packages %}
|
|
||||||
- pkg: salt-master
|
|
||||||
{% endif %}
|
|
||||||
- file: salt-master
|
- file: salt-master
|
||||||
- file: remove-old-master-conf-file
|
- file: remove-old-master-conf-file
|
||||||
|
|
||||||
|
@ -31,12 +31,16 @@ salt-minion:
|
|||||||
{# use force == True as workaround #}
|
{# use force == True as workaround #}
|
||||||
- force: True
|
- force: True
|
||||||
- version_check: /opt/salt/bin/salt-minion --version=.*{{ salt_settings.version }}.*
|
- version_check: /opt/salt/bin/salt-minion --version=.*{{ salt_settings.version }}.*
|
||||||
|
- require_in:
|
||||||
|
- service: salt-minion
|
||||||
{%- else %}
|
{%- else %}
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
- name: {{ salt_settings.salt_minion }}
|
- name: {{ salt_settings.salt_minion }}
|
||||||
{%- if salt_settings.version is defined %}
|
{%- if salt_settings.version is defined %}
|
||||||
- version: {{ salt_settings.version }}
|
- version: {{ salt_settings.version }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
- require_in:
|
||||||
|
- service: salt-minion
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
file.recurse:
|
file.recurse:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{% from "salt/map.jinja" import salt_settings with context %}
|
{% from "salt/map.jinja" import salt_settings with context %}
|
||||||
|
|
||||||
{%- if grains['os']|lower not in ('amazon', 'fedora', 'suse',) %}
|
{%- if grains['os']|lower not in ('amazon', 'fedora') %}
|
||||||
saltstack-pkgrepo:
|
saltstack-pkgrepo:
|
||||||
pkgrepo.managed:
|
pkgrepo.managed:
|
||||||
- humanname: SaltStack repo for RHEL/CentOS $releasever
|
- humanname: SaltStack repo for RHEL/CentOS $releasever
|
||||||
|
@ -10,6 +10,10 @@ salt-syndic:
|
|||||||
{%- if salt_settings.version is defined %}
|
{%- if salt_settings.version is defined %}
|
||||||
- version: {{ salt_settings.version }}
|
- version: {{ salt_settings.version }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
- require_in:
|
||||||
|
- service: salt-syndic
|
||||||
|
- watch_in:
|
||||||
|
- service: salt-syndic
|
||||||
{% endif %}
|
{% endif %}
|
||||||
service.running:
|
service.running:
|
||||||
- enable: True
|
- enable: True
|
||||||
|
Loading…
Reference in New Issue
Block a user