Add derived env vars for target hostname and fqdn.
This commit is contained in:
		
					parent
					
						
							
								9ce8f6bbb0
							
						
					
				
			
			
				commit
				
					
						dbcc94ab65
					
				
			
		
					 23 changed files with 181 additions and 59 deletions
				
			
		|  | @ -53,8 +53,8 @@ Cdist expects the initial manifest at **cdist/conf/manifest/init**. | |||
| 
 | ||||
| Within this initial manifest you define, which objects should be | ||||
| created on which host. To distinguish between hosts, you can use the | ||||
| environment variable **__target_host**. Let's have a look at a simple | ||||
| example:: | ||||
| environment variable **__target_host** and/or **__target_hostname** and/or | ||||
| **__target_fqdn**. Let's have a look at a simple example:: | ||||
| 
 | ||||
|     __cdistmarker | ||||
| 
 | ||||
|  |  | |||
|  | @ -226,7 +226,18 @@ __object_name | |||
|     The full qualified name of the current object. | ||||
|     Available for: type manifest, type explorer, type gencode. | ||||
| __target_host | ||||
|     The host we are deploying to. | ||||
|     The host we are deploying to. This is primary variable. It's content is | ||||
|     literally the one user passed in. | ||||
|     Available for: explorer, initial manifest, type explorer, type manifest, type gencode, shell. | ||||
| __target_hostname | ||||
|     The hostname of host we are deploying to. This variable is derived from | ||||
|     **__target_host** (using **socket.getaddrinfo(__target_host)** and then | ||||
|     **socket.gethostbyaddr()**). | ||||
|     Available for: explorer, initial manifest, type explorer, type manifest, type gencode, shell. | ||||
| __target_fqdn | ||||
|     The fully qualified domain name of the host we are deploying to. | ||||
|     This variable is derived from **__target_host** | ||||
|     (using **socket.getfqdn()**). | ||||
|     Available for: explorer, initial manifest, type explorer, type manifest, type gencode, shell. | ||||
| __type | ||||
|     Path to the current type. | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue