[Minion] [returner] [Elasticsearch] Yaml read patch + example.pillar update (#359)
* Minion/returner/elasticsearch yaml read fix. * Improved the documentation for the elasticsearch returner
This commit is contained in:
		
							parent
							
								
									32d9a9467d
								
							
						
					
					
						commit
						9f33d2afe1
					
				| @ -212,6 +212,24 @@ salt: | ||||
|       - 'minion/deploy': | ||||
|         - /srv/salt/reactors/deploy.sls | ||||
| 
 | ||||
|     # Optional: Configure an elasticsearch returner | ||||
|     return: elasticsearch | ||||
|     elasticsearch: | ||||
|       hosts: | ||||
|         - example.elasticsearch.host:9200 | ||||
|         - example.elasticsearch.host2:9200 | ||||
|       index_date: True | ||||
|       index: salt | ||||
|       number_of_shards: 5 | ||||
|       number_of_replicas: 2 | ||||
|       debug_returner_payload: True | ||||
|       states_count: True | ||||
|       states_order_output: True | ||||
|       states_single_index: True | ||||
|       functions_blacklist: | ||||
|         - test.ping | ||||
|         - saltutil.find_job | ||||
| 
 | ||||
|   # salt cloud config | ||||
|   cloud: | ||||
|     master: salt | ||||
| @ -342,3 +360,4 @@ salt_formulas: | ||||
|       - salt-formula | ||||
|       - postfix-formula | ||||
|       - openssh-formula | ||||
| 
 | ||||
|  | ||||
| @ -1215,16 +1215,18 @@ return: | ||||
| {% if 'elasticsearch' in cfg_minion -%} | ||||
| {%- do default_keys.append('elasticsearch') %} | ||||
| {%- do default_keys.append('return') %} | ||||
| 
 | ||||
| #####   elasticsearch connection settings  ##### | ||||
| ########################################## | ||||
| elasticsearch: | ||||
| {%- for name, value in cfg_minion['elasticsearch'].items() %} | ||||
| {%- if value is list %} | ||||
| elasticsearch.{{ name }}: | ||||
|   {{ name }}: | ||||
| {%- for objvalue in value %} | ||||
|   - {{ objvalue }} | ||||
|     - {{ objvalue }} | ||||
| {%- endfor %} | ||||
| {%- else %} | ||||
| elasticsearch.{{ name }}: {{ value }} | ||||
|   {{ name }}: {{ value }} | ||||
| {%- endif %} | ||||
| {%- endfor %} | ||||
| {%- endif %} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Felix Russell
						Felix Russell