You've already forked pgbackrest
							
							
				mirror of
				https://github.com/pgbackrest/pgbackrest.git
				synced 2025-10-30 23:37:45 +02:00 
			
		
		
		
	Add id param for hosts created with host-add.
The host-*-ip variable is created from the id param so the name param can be changed without affecting the host-*-ip variable. If id is not specified then it is copied from name.
This commit is contained in:
		| @@ -817,6 +817,15 @@ sub hostKey | ||||
|         image => $self->{oManifest}->variableReplace($oHost->paramGet('image')), | ||||
|     }; | ||||
|  | ||||
|     if (defined($oHost->paramGet('id', false))) | ||||
|     { | ||||
|         $hCacheKey->{id} = $self->{oManifest}->variableReplace($oHost->paramGet('id')); | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         $hCacheKey->{id} = $hCacheKey->{name}; | ||||
|     } | ||||
|  | ||||
|     if (defined($oHost->paramGet('option', false))) | ||||
|     { | ||||
|         $$hCacheKey{option} = $self->{oManifest}->variableReplace($oHost->paramGet('option')); | ||||
| @@ -997,7 +1006,7 @@ sub sectionChildProcess | ||||
|  | ||||
|             if ($bCacheHit) | ||||
|             { | ||||
|                 $self->{oManifest}->variableSet("host-$$hCacheKey{name}-ip", $$hCacheValue{ip}, true); | ||||
|                 $self->{oManifest}->variableSet('host-' . $hCacheKey->{id} . '-ip', $hCacheValue->{ip}, true); | ||||
|             } | ||||
|             else | ||||
|             { | ||||
| @@ -1017,7 +1026,7 @@ sub sectionChildProcess | ||||
|                     $$hCacheKey{option}); | ||||
|  | ||||
|                 $self->{host}{$$hCacheKey{name}} = $oHost; | ||||
|                 $self->{oManifest}->variableSet("host-$$hCacheKey{name}-ip", $oHost->{strIP}, true); | ||||
|                 $self->{oManifest}->variableSet('host-' . $hCacheKey->{id} . '-ip', $oHost->{strIP}, true); | ||||
|                 $$hCacheValue{ip} = $oHost->{strIP}; | ||||
|  | ||||
|                 # Add to the host group | ||||
|   | ||||
| @@ -184,6 +184,7 @@ | ||||
|  | ||||
| <!-- Host elements --> | ||||
| <!ELEMENT host-add (execute*)> | ||||
|     <!ATTLIST host-add id CDATA ""> | ||||
|     <!ATTLIST host-add name CDATA #REQUIRED> | ||||
|     <!ATTLIST host-add user CDATA #REQUIRED> | ||||
|     <!ATTLIST host-add image CDATA #REQUIRED> | ||||
|   | ||||
| @@ -173,6 +173,10 @@ | ||||
|                         <p>PDF rendering improvements.  Check both <path>doc-path</path> and <path>bin-path</path> for logo.  Allow PDF to be output to a location other than the <path>output</path> directory. Use PDF-specific version variable for more flexible formatting.  Allow sections to be excluded from table of contents.  More flexible replacements for titles and footers.</p> | ||||
|                     </release-item> | ||||
|  | ||||
|                     <release-item> | ||||
|                         <p>Add <id>id</id> param for hosts created with <code>host-add</code>.  The <id>host-*-ip</id> variable is created from the <id>id</id> param so the <id>name</id> param can be changed without affecting the <id>host-*-ip</id> variable.  If <id>id</id> is not specified then it is copied from <id>name</id>.</p> | ||||
|                     </release-item> | ||||
|  | ||||
|                     <release-item> | ||||
|                         <p>Deploy historical documentation to <path>prior</path> rather than the root directory.</p> | ||||
|                     </release-item> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user