File tree 6 files changed +74
-12
lines changed
6 files changed +74
-12
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,13 @@ Available states
45
45
.. contents ::
46
46
:local:
47
47
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
+
48
55
``salt.minion ``
49
56
^^^^^^^^^^^^^^^
50
57
Original file line number Diff line number Diff line change 80
80
# salt master config
81
81
master_config_use_TOFS : true
82
82
master :
83
+ standalone : false
83
84
fileserver_backend :
84
85
- git
85
86
- s3fs
@@ -163,6 +164,9 @@ salt:
163
164
minion_config_use_TOFS : true
164
165
minion :
165
166
167
+ # standalone setup
168
+ master_type : false # see init.sls & standalone.sls
169
+
166
170
# single master setup
167
171
master : salt
168
172
@@ -268,6 +272,13 @@ salt:
268
272
- test.ping
269
273
- saltutil.find_job
270
274
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
+
271
282
# salt cloud config
272
283
cloud :
273
284
master : salt
Original file line number Diff line number Diff line change @@ -30,11 +30,16 @@ salt:
30
30
salt_api : salt-api
31
31
salt_ssh : salt-ssh
32
32
33
+ pkgrepo : ' ' # see osfamilymap
34
+ ssh_roster : {} # see pillar data
35
+
33
36
python_git : python-git
34
37
python_dulwich : python-dulwich
35
38
36
39
master :
37
40
gitfs_provider : gitpython
41
+ minion :
42
+ master_type : true # see init.sls & standalone.sls
38
43
39
44
gitfs :
40
45
dulwich :
62
67
maps : salt://salt/files/cloud.maps.d
63
68
64
69
salt_formulas :
70
+ list : {} # via pillar data
65
71
checkout_orig_branch : false
66
72
git_opts :
67
73
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
+
1
7
include:
2
8
- .{{ grains[' os_family' ]| lower }}
9
+
10
+ {%- endif % }
Original file line number Diff line number Diff line change 1
1
{%- set tplroot = tpldir.split(' /' )[0 ] %}
2
2
{% from " salt/map.jinja" import salt_settings with context % }
3
3
4
- salt- minion:
5
- {% if salt_settings.install_packages % }
4
+ salt- minion- standalone :
5
+ {% if salt_settings.install_packages % }
6
6
pkg.installed:
7
7
- name: {{ salt_settings.salt_minion }}
8
- {%- if salt_settings.version is defined % }
8
+ {%- if salt_settings.version is defined % }
9
9
- version: {{ salt_settings.version }}
10
- {%- endif % }
11
- {% endif % }
10
+ {%- endif % }
11
+ {% endif % }
12
12
file .recurse:
13
13
- name: {{ salt_settings.config_path }}/ minion.d
14
14
- template: jinja
@@ -17,19 +17,19 @@ salt-minion:
17
17
- exclude_pat: _*
18
18
- context:
19
19
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 % }
21
21
service.running:
22
22
- enable: True
23
- {%- else % }
23
+ {%- else % }
24
24
service.dead:
25
25
- enable: False
26
- {%- endif % }
26
+ {%- endif % }
27
27
- name: {{ salt_settings.minion_service }}
28
28
- 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
33
33
34
34
# clean up old _defaults.conf file if they have it around
35
35
remove- old- standalone- conf- file :
You can’t perform that action at this time.
0 commit comments