ページの先頭行へ戻る
Systemwalker Software Configuration Manager リファレンスガイド
FUJITSU Software

2.2.8 構成変更テンプレート定義ファイル

ファイル名

任意

使用用途

構成変更テンプレート定義を記述したXMLファイルです。

構成変更テンプレートを作成、更新、および、定義表示を実施するためのファイルです。本XMLファイルを使用して、構成変更テンプレートを作成・更新する場合、『操作ガイド』の「構成変更テンプレートの作成」も参照に本XMLファイルを作成してください。

ファイル形式

<?xml version="1.0" encoding="UTF-8"?>
<template>
  <parameters>
    <parameter>
      <parameterName>[パラメーター名]</parameterName>
      <parameterType>[パラメーターの種別]</parameterType>
      <parameterDescription>[パラメーターの説明]</parameterDescription>
    </parameter>
    …
  </parameters>
  <processes>
    <process>
      <processName>[処理名]</processName>
      <processType>[処理種別]</processType>
      <processParameters>
      ●サーバ稼働確認
      <target>[対象]</target>
      <monitorTime>[監視時間]</monitorTime>
      ●スクリプト実行
      <target>[対象]</target>
      <script>[スクリプト]</script>
      <argument>[引数]</argument>
      <successValues>[正常復帰値]</successValues>
      <singleUserMode>[シングルユーザーモード]</singleUserMode>
      ●OS再起動
      <target>[対象]</target>
      ●コマンド実行
      <target>[対象]</target>
      <command>[コマンド]</command>
      <argument>[引数]</argument>
      <successValues>[正常復帰値]</successValues>
      <singleUserMode>[シングルユーザーモード]</singleUserMode>
      <asynchronousExecution>[非同期実行]</asynchronousExecution>
      ●ファイル配付
      <target>[対象]</target>
      <distributionFile>[配付ファイル]</distributionFile>
      <destinationDirectory>[配付先]</destinationDirectory>
      ●ファイル収集
      <target>[対象]</target>
      <collectionFile>[収集ファイル]</collectionFile>
      <storageDirectory>[格納先]</storageDirectory>
      </processParameters>
    </process>
    …
  </processes>
</template>

以下にそれぞれの項目(タグ)の説明および設定内容について示します。

この情報を参考にして、必要に応じて構成変更テンプレートを修正してください。

タグ名の[ ]は、省略可能なタグであることを示しています。

タグ

設定範囲

説明

必須

設定内容

parameters

-

-

テンプレートの複数のパラメーターを指定します。

×

[parameter]

-

0個以上

テンプレートのパラメーターを指定します。

×

複数パラメーターを定義する場合は、本タグを複数記載してください。

processes

-

-

テンプレートの複数の処理を指定します。

×

process

-

1個以上

テンプレートの処理を指定します。

×

複数処理を実行する場合、実行する順番に本タグを記載してください。


parameter要素に指定する内容を以下に示します。タグ名の[ ]は、各parameter要素内で省略可能なタグであることを示しています。

タグ

設定範囲

説明

必須

設定内容

parameterName

string ASCII

256文字以内

パラメーター名です。

英数字、「.」、「_」および「-」を使用可能です。ただし、先頭は英字を指定してください。

[parameterDescription]

string UTF8

256文字以内

パラメーターの説明です。

parameterType

string ASCII

選択

パラメーターのオプションです。

以下から指定してください。

  • 「server」 : サーバ

  • 「file」 : ファイル

  • 「string」 : 文字列

  • 「number」 : 数値

  • 「boolean」 : 真偽値

  • 「password」 : パスワード


process要素に指定する内容を以下に示します。

タグ

設定範囲

説明

必須

設定内容

processName

string UTF8

85文字以内

処理の名前です。

< > & " ' | , は指定不可。

processType

string ASCII

選択

処理の種別です。

以下から指定してください。

  • 「checkServer」 : サーバ稼働確認

  • 「scriptExecution」 : スクリプト実行

  • 「reboot」 : OS再起動

  • 「commandExecution」 : コマンド実行

  • 「fileDistribution」 : ファイル配付

  • 「fileCollection」 : ファイル収集

processParameters

-

-

処理の設定情報です。

×


processParameters要素に指定する内容を以下に示します。processParameters要素に指定する内容は、処理種別ごとに異なります。タグ名の[ ]は、処理種別ごとに省略可能なタグであることを示しています。また、設定情報の値の指定方法については、『操作ガイド』の「設定情報の定義」を参照してください。

処理種別

タグ

設定情報

必須

設定内容

サーバ稼働確認

target

対象

[monitorTime]

監視時間

タグを省略した場合、"0"が設定されます。

スクリプト実行

target

対象

script

スクリプト

資産を指定する場合、以下の形式で指定してください。資産版数は省略することができます。省略した場合、構成変更ジョブの実行時に、最新の版数が指定されます。

media://[資産ID]/[資産版数]

[argument]

引数

タグまたは値を省略した場合、空文字が設定され引数なしでスクリプトが実行されます。

[successValues]

正常復帰値

タグを省略した場合、"0"が設定されます。

[singleUserMode]

シングルユーザーモード

タグを省略した場合、"false"が設定されます。

OS再起動

target

対象

コマンド実行

target

対象

command

コマンド

[argument]

引数

タグまたは値を省略した場合、空文字が設定され引数なしでスクリプトが実行されます。

[successValues]

正常復帰値

タグ省略した場合、"0"が設定されます。

[singleUserMode]

シングルユーザーモード

タグを省略した場合、"false"が設定されます。

[asynchronousExecution]

非同期実行

タグを省略した場合、"false"が設定されます。

ファイル配付

target

対象

distributionFile

配付ファイル

資産を指定する場合、以下の形式で指定してください。資産版数は省略することができます。省略した場合、構成変更ジョブの実行時に、最新の版数が指定されます。

media://[資産ID]/[資産版数]

[destinationDirectory]

配付先

タグを省略した場合、"#{work.directory}"が設定されワークディレクトリに配付されます。

ファイル収集

target

対象

collectionFile

収集ファイル

storageDirectory

格納先

必須欄の記号は、以下を意味しています。

○:タグを指定した場合は、必ず値を指定してください。

△:値は省略可能です。

×:値の設定は不要です。タグだけの指定です。

使用例

<?xml version="1.0" encoding="UTF-8"?>
<template>
  <parameters>
    <parameter>
      <parameterName>target.server</parameterName>
      <parameterType>server</parameterType>
      <parameterDescription>インストール対象のサーバです。</parameterDescription>
    </parameter>
    <parameter>
      <parameterName>msi.file</parameterName>
      <parameterType>file</parameterType>
      <parameterDescription>MSIファイルです。</parameterDescription>
    </parameter>
  </parameters>
  <processes>
    <process>
      <processName>サーバ稼働確認</processName>
      <processType>checkServer</processType>
      <processParameters>
        <target>{{target.server}}</target>
        <monitorTime>0</monitorTime>
      </processParameters>
    </process>
    <process>
      <processName>MSIファイルの配付</processName>
      <processType>fileDistribution</processType>
      <processParameters>
        <target>{{target.server}}</target>
        <distributionFile>{{msi.file}}</distributionFile>
        <destinationDirectory>#{work.directory}</destinationDirectory>
      </processParameters>
    </process>
    <process>
      <processName>インストールの実行</processName>
      <processType>commandExecution</processType>
      <processParameters>
        <target>{{target.server}}</target>
        <command>msiexec</command>
        <argument>/I "#{work.directory}\{{msi.file}}" /qn ALLUSERS=1 REBOOT=ReallySuppress</argument>
        <successValues>0,1641,3010</successValues>
        <singleUserMode>false</singleUserMode>
        <asynchronousExecution>false</asynchronousExecution>
      </processParameters>
    </process>
  </processes>
</template>