Changes

Variable setting through hosts/profiles/packages

33 bytes added, 19:22, 30 September 2007
m
no edit summary
To take an example, say most people use a licence number of 1234 but there are some others who need 6789. We might be able to define the package as:
<pre>
<package id='test' name='testpackage'>
<variable name='testlicencenumber' value='1234'/>
...
</package>
</pre>
which defines a default licence number. If we have a profile which needs a different value, we set:
<pre>
<profile id='others'>
<variable name='testlicencenumber' value='6789' />
...
</profile>
</pre>
This setting of the variable in the profile over-rides that set in the package. Likewise, a variable set in hosts.xml over-rides any set in profiles or packages so we can accommodate an individual host using a licence number "abcd" by:
<pre>
<host name='pcn12' profile-id='others'>
<variable name='testlicencenumber' value='abcd' />
...
</host>
</pre>
[[Category:Documentation]]