File tree Expand file tree Collapse file tree 6 files changed +74
-12
lines changed
Expand file tree Collapse file tree 6 files changed +74
-12
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,13 @@ Available states
4545.. contents ::
4646 :local:
4747
48+ ``salt ``
49+ ^^^^^^^^
50+
51+ *Meta-state (This is a state that includes other states) *.
52+
53+ This calls all runable states based on configured pillar data.
54+
4855``salt.minion ``
4956^^^^^^^^^^^^^^^
5057
Original file line number Diff line number Diff line change 8080 # salt master config
8181 master_config_use_TOFS : true
8282 master :
83+ standalone : false
8384 fileserver_backend :
8485 - git
8586 - s3fs
@@ -163,6 +164,9 @@ salt:
163164 minion_config_use_TOFS : true
164165 minion :
165166
167+ # standalone setup
168+ master_type : false # see init.sls & standalone.sls
169+
166170 # single master setup
167171 master : salt
168172
@@ -268,6 +272,13 @@ salt:
268272 - test.ping
269273 - saltutil.find_job
270274
275+ # init.sls skips salt.api and salt.syndic states
276+ # unless those dicts are populated with something
277+ api :
278+ somekey : somevalue
279+ syndic :
280+ somekey : somevalue
281+
271282 # salt cloud config
272283 cloud :
273284 master : salt
Original file line number Diff line number Diff line change @@ -30,11 +30,16 @@ salt:
3030 salt_api : salt-api
3131 salt_ssh : salt-ssh
3232
33+ pkgrepo : ' ' # see osfamilymap
34+ ssh_roster : {} # see pillar data
35+
3336 python_git : python-git
3437 python_dulwich : python-dulwich
3538
3639 master :
3740 gitfs_provider : gitpython
41+ minion :
42+ master_type : true # see init.sls & standalone.sls
3843
3944 gitfs :
4045 dulwich :
6267 maps : salt://salt/files/cloud.maps.d
6368
6469salt_formulas :
70+ list : {} # via pillar data
6571 checkout_orig_branch : false
6672 git_opts :
6773 default :
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+ # vim: ft=sls
3+
4+ include:
5+ - salt.pkgrepo
6+ {%- if salt.config.get(' salt_formulas:list' ) %}
7+ - salt.formulas
8+ {%- endif %}
9+ {%- if salt.config.get(' salt:master' )| length > 1 %}
10+ - salt.master
11+ {%- endif %}
12+ {%- if salt.config.get(' salt:cloud' )| length > 1 %}
13+ - salt.cloud
14+ {%- endif %}
15+ {%- if salt.config.get(' salt:ssh_roster' ) %}
16+ - salt.ssh
17+ {%- endif %}
18+ {%- if salt.config.get(' salt:minion' )| length > 1 %}
19+ {%- if salt.config.get(' salt:minion:master_type' ) %}
20+ - salt.minion
21+ {%- else %}
22+ - salt.standalone
23+ {%- endif %}
24+ {%- endif %}
25+ {%- if salt.config.get(' salt:api' ) %}
26+ - salt.api
27+ {%- endif %}
28+ {%- if salt.config.get(' salt:syndic' ) %}
29+ - salt.syndic
30+ {%- endif %}
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+ # vim: ft=sls
3+ {% from " salt/map.jinja" import salt_settings with context % }
4+
5+ {%- if salt_settings.pkgrepo % }
6+
17include:
28 - .{{ grains[' os_family' ]| lower }}
9+
10+ {%- endif % }
Original file line number Diff line number Diff line change 11{%- set tplroot = tpldir.split(' /' )[0 ] %}
22{% from " salt/map.jinja" import salt_settings with context % }
33
4- salt- minion:
5- {% if salt_settings.install_packages % }
4+ salt- minion- standalone :
5+ {% if salt_settings.install_packages % }
66 pkg.installed:
77 - name: {{ salt_settings.salt_minion }}
8- {%- if salt_settings.version is defined % }
8+ {%- if salt_settings.version is defined % }
99 - version: {{ salt_settings.version }}
10- {%- endif % }
11- {% endif % }
10+ {%- endif % }
11+ {% endif % }
1212 file .recurse:
1313 - name: {{ salt_settings.config_path }}/ minion.d
1414 - template: jinja
@@ -17,19 +17,19 @@ salt-minion:
1717 - exclude_pat: _*
1818 - context:
1919 standalone: True
20- {%- if salt_settings.minion.master_type is defined and salt_settings.minion.master_type == ' disable ' % }
20+ {%- if not salt_settings.minion.master_type % }
2121 service.running:
2222 - enable: True
23- {%- else % }
23+ {%- else % }
2424 service.dead:
2525 - enable: False
26- {%- endif % }
26+ {%- endif % }
2727 - name: {{ salt_settings.minion_service }}
2828 - require:
29- {% if salt_settings.install_packages % }
30- - pkg: salt- minion
31- {% endif % }
32- - file : salt- minion
29+ {% if salt_settings.install_packages % }
30+ - pkg: salt- minion- standalone
31+ {% endif % }
32+ - file : salt- minion- standalone
3333
3434# clean up old _defaults.conf file if they have it around
3535remove- old- standalone- conf- file :
You can’t perform that action at this time.
0 commit comments