Move host information to pillar data
This commit is contained in:
		
							parent
							
								
									2ff2a8174c
								
							
						
					
					
						commit
						e582e4a6c4
					
				
					 2 changed files with 25 additions and 24 deletions
				
			
		|  | @ -16,3 +16,19 @@ gnuviechadmin: | |||
|   ldap_base_dn: dc=gva,dc=local | ||||
|   ldap_groups_ou: groups | ||||
|   ldap_users_ou: users | ||||
|   machines: | ||||
|     gva.local: | ||||
|       ip: 172.16.3.2 | ||||
|       names: | ||||
|         - mq | ||||
|         - gva.local | ||||
|     gvaldap.local: | ||||
|       ip: 172.16.3.3 | ||||
|     gvafile.local: | ||||
|       ip: 172.16.3.4 | ||||
|     gvaweb.local: | ||||
|       ip: 172.16.3.5 | ||||
|     gvamysql.local: | ||||
|       ip: 172.16.3.6 | ||||
|     gvapgsql.local: | ||||
|       ip: 172.16.3.7 | ||||
|  |  | |||
|  | @ -1,31 +1,16 @@ | |||
| {% from 'gnuviechadmin/vars.sls' import home, gva_component, gva_amqp_user, checkout, appdir, venv %} | ||||
| 
 | ||||
| gva.local: | ||||
| {% for host in salt['pillar.get']('gnuviechadmin:machines') %} | ||||
| {{ host }}: | ||||
|   host.present: | ||||
|     - ip: 172.16.3.2 | ||||
|     - ip: {{ salt['pillar.get']('gnuviechadmin:machines:%s:ip' % host) }} | ||||
| {% if salt['pillar.get']('gnuviechadmin:machines:%s:names' % host) %} | ||||
|     - names: | ||||
|       - mq | ||||
|       - gva.local | ||||
| 
 | ||||
| gvaldap.local: | ||||
|   host.present: | ||||
|     - ip: 172.16.3.3 | ||||
| 
 | ||||
| gvafile.local: | ||||
|   host.present: | ||||
|     - ip: 172.16.3.4 | ||||
| 
 | ||||
| gvaweb.local: | ||||
|   host.present: | ||||
|     - ip: 172.16.3.5 | ||||
| 
 | ||||
| gvamysql.local: | ||||
|   host.present: | ||||
|     - ip: 172.16.3.6 | ||||
| 
 | ||||
| gvapgsql.local: | ||||
|   host.present: | ||||
|     - ip: 172.16.3.7 | ||||
| {% for machine in salt['pillar.get']('gnuviechadmin:machines:%s:names' % host) %} | ||||
|       - {{ machine }} | ||||
| {% endfor %} | ||||
| {% endif %} | ||||
| {% endfor %} | ||||
| 
 | ||||
| gnuviechadmin-packages: | ||||
|   pkg.installed: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue