The Inventory Comparison feature shows the differences of installed components between two hosts. The hosts must be of the same distribution-architecture, both in console and in CLI commands.
Comparing inventories offers the following features:
Check that managed hosts of same functions have same software.
Run a job that replicates the software deployment of one host to another.
Rollback a managed host to a saved inventory.
Compare the inventory of a host with the inventory of a group of hosts. Make a single host like the rest of the hosts in a group.
There are different types of inventories to choose from. The following table describes each type.
Current Inventory – Installed software as-is
Automatically Saved Inventory – Before a job, Sun Update Connection – Enterprise automatically saves a record of the inventory of selected hosts
indicated by AU: at the beginning of the inventory name
Saved Host Inventory – User initiated saved record of the inventory of a selected host
Saved Group Inventory – User-initiated saved record of the inventory of a group; a composite list of software installed on all hosts of the group
Before comparing inventories, you should run the Check System profile on the host or group. This will ensure that the source inventory does not have dependency issues. If you will be managing Solaris hosts, you should run the Check Withdrawn Patches profile. This will replace withdrawn Solaris patches with appropriate operating software. See Chapter 7, System Management Profiles.
In addition, if you will be comparing Solaris machines, you should edit the PKG settings (see Host Preferences – PKGs) to ensure that the deployment operates as expected.
Make sure the Inventory panel is open in the main window. From the View menu, choose Inventory.
Do one of the following:
From the tool bar, click the Compare Inventories button.
Right-click in the Hosts list and choose Compare Inventories.
From the Hosts menu, choose Compare Inventories.
The Inventory Comparison window opens.
Click the Host Select button to the right of the Target host field.
The Host Selection window opens.
Select the host you want to change and then click OK.
The Host Selection window closes. The selected host name appears in the Target host field.
From the Inventory drop-down list, select a stored inventory or the current inventory.
If you want to create a job from the comparison, select Current Inventory.
Click the Host Select button to the right of the Source field.
The Host Selection window opens.
Select the managed host you want to use as the source and then click OK.
The Host Selection window closes. The selected host name appears in the Source field.
From the Inventory drop-down list, select a saved inventory.
(If the source host is different from the target host, you can select the current inventory.)
In the Filter section, select the types of components you want to be in the comparison:
Software packages
Hardware drivers
Configuration Files
whether you want the comparison to ignore differences in Versions of the same packages
Click Compare.
The results of the inventory comparison are displayed.
Under the See section of the Inventory Comparison window, select Tasks to Make Target like Source.
If the results include at least one difference between the selected inventories which can be converted to an action (differences in configuration files cannot be converted), more features are available. See the following procedures.
The compare host inventories CLI command outputs two lists: what is installed in the source inventory and not in the target inventory, and what is in the target inventory and not in the source inventory.
Both hosts must be of the same distribution. Both the source host and the target host may be the same host, but the inventories must be different.
If you do not use the -s or the -ts parameters, the current inventories are used by default. See Compare Hosts and Inventories (-chi) Command.
#! /bin/bash echo -n “Enter your user name:” read user echo -n “Enter your password:” read password echo “What distribution are you working on?” uce_cli -ld -u “$user” -p “$password” echo -n “Copy the distribution name you want:” read distroGroup echo “The list of hosts in this distribution is:” uce_cli -lgh -g “$distroGroup hosts” -u “$user” -p “$password” echo -n “Copy the name of the source host:” read sourcehost echo -n “Copy the name of the target host:” read targethost echo “The list of saved inventories is:” uce_cli -lss -g “$distroGroup hosts” -u “$user” -p “$password” echo -n “Copy the name of the source inventory:” read sourceInven echo -n “Copy the name of the target inventory:” read targetInven uce_cli -chi -h “$sourcehost” -s “$sourceInven” -t “$targethost” -ts “$targetInven” \ -u “$user” -p “$password” |