Sample response file: Defining variables

This sample response file shows how to define variables.

Sample response file for defining variables
<!-- XML encoding. -->
<?xml version="1.0" encoding="UTF-8"?> 

<!-- Response file attributes. -->
<agent-input>

<!-- Variables section. -->
<variables>
<!-- A variable with no default value. -->
<variable name='role'/>

<!-- A variable with a default value. -->
<variable name='sharedLocation' value='value1'/>

<!-- A variable with default value of a predefined variable. -->
<variable name='customPropertyValue' value='${user:name}'/>
	
<!-- A variable with default value "main" that changes based on the value of the role variable. -->
<variable name='features' value='main'>
<if name='role' equals='developer' value='main,dev.tools'/>
<if name='role' equals='tester' value='main,test.tools'/>
</variable>
	
<!-- A variable that changes based on a predefined variable for the operating system. -->
<variable name='installDir'>
<if name='platform:os' equals='win32' value='value2'/>
<if name='platform:os' equals='linux' value='value3'>
<if name='platform:arch' equals='x86' value='value4'/>
<if name='platform:arch' equals='ppc' value='value5'/>
</if>
</variable>	
</variables>
  
<!-- Repository locations where Installation Manager and product installation files can be retrieved from. -->
<server>
<repository location='http://a.site.com/local/products/InstallationManager/1.7.0000.20130901_0712/repository.config'>
</repository>
</server>

<!-- Profile attributes for the product installation. Include data keys for product specific profile properties. -->
<profile id='IBM Software Delivery Platform' installLocation='${installDir}'>
<data key='customProperty' value='${customPropertyValue}'/>
</profile>

<!-- Offerings and features to install. We can install Installation Manager and packages in one response file. -->
<install>
<offering id='com.ibm.sample.offering.id' profile='IBM Software Delivery Platform' features='${features}'/>
</install>

<!-- Installation Manager preferences.-->
<preference name='com.ibm.cic.common.core.preferences.eclipseCache' value='${sharedLocation}'/>

</agent-input>

Home