Merge pull request #73 from rhertzog/standalone
Add a “salt.standalone” state
This commit is contained in:
		
						commit
						c8c0781e8f
					
				| @ -41,6 +41,12 @@ Install salt cloud. | ||||
| Install salt-ssh with roster file. | ||||
| Configure pillar data under salt:ssh_roster to feed the template. | ||||
| 
 | ||||
| ``salt.standalone`` | ||||
| ------------ | ||||
| 
 | ||||
| Install a minion and configure it in `standalone mode | ||||
| <docs.saltstack.com/en/latest/topics/tutorials/standalone_minion.html>`_. | ||||
| 
 | ||||
| ``Configuration`` | ||||
| ================= | ||||
| Every option available in the templates can be set in pillar. Settings under 'salt' will be overridden by more specific settings under ``salt['master']``, ``salt['minion']`` or ``salt['cloud']`` | ||||
|  | ||||
| @ -386,7 +386,11 @@ id: {{ minion['id'] }} | ||||
| # Set the file client. The client defaults to looking on the master server for | ||||
| # files, but can be directed to look at the local file directory setting | ||||
| # defined below by setting it to local. | ||||
| {%- if standalone %} | ||||
| file_client: local | ||||
| {%- else %} | ||||
| {{ get_config('file_client', 'remote') }} | ||||
| {%- endif %} | ||||
| 
 | ||||
| # The file directory works on environments passed to the minion, each environment | ||||
| # can have multiple root directories, the subdirectories in the multiple file | ||||
|  | ||||
| @ -8,6 +8,8 @@ salt-minion: | ||||
|     - template: jinja | ||||
|     - source: salt://salt/files/minion.d | ||||
|     - clean: True | ||||
|     - context: | ||||
|         standalone: False | ||||
|   service.running: | ||||
|     - enable: True | ||||
|     - name: {{ pkgs.get('minion-service', 'salt-minion') }} | ||||
|  | ||||
							
								
								
									
										18
									
								
								salt/standalone.sls
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								salt/standalone.sls
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,18 @@ | ||||
| {% from "salt/package-map.jinja" import pkgs with context %} | ||||
| 
 | ||||
| salt-minion: | ||||
|   pkg.installed: | ||||
|     - name: {{ pkgs['salt-minion'] }} | ||||
|   file.recurse: | ||||
|     - name: {{ pkgs.get('config-path', '/etc/salt') }}/minion.d | ||||
|     - template: jinja | ||||
|     - source: salt://salt/files/minion.d | ||||
|     - clean: True | ||||
|     - context: | ||||
|         standalone: True | ||||
|   service.dead: | ||||
|     - enable: False | ||||
|     - name: {{ pkgs.get('minion-service', 'salt-minion') }} | ||||
|     - require: | ||||
|       - pkg: salt-minion | ||||
|       - file: salt-minion | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Wolodja Wentland
						Wolodja Wentland