6.2. 設定の既存クライアントへの適用

Puppet 設定は、Red Hat Satellite 6 でプロビジョニングされていない既存のクライアントに適用されている可能性があります。このような場合には、Red Hat Satellite 6 に登録した後に、既存のクライアントに Puppet をインストールして設定します。

既存のシステムを Red Hat Satellite 6 に登録します。既存ホストの登録に関する情報は、『ホスト の管理』ガイドの 「ホストの登録 」を参照し てください。

重要

puppet パッケージは、Red Hat Satellite Tools 6.8 リポジトリーに含まれます。続行する前に、このリポジトリーを有効にしてください。

Puppet エージェントをインストールし、有効にする方法:

  1. 端末コンソールを開き、root としてログインします。
  2. Puppet エージェントをインストールします。

    # yum install puppet
  3. システムの起動時に Puppet エージェントが起動するように設定します。

    • Red Hat Enterprise Linux 6 の場合:

      # chkconfig puppet on
    • Red Hat Enterprise Linux 7 の場合:

      # systemctl enable puppet

Puppet エージェントの設定

  1. /etc/puppetlabs/puppet/puppet.conf ファイルを変更して Puppet エージェントを設定します。

    # vi /etc/puppetlabs/puppet/puppet.conf
    [main]
        # The Puppet log directory.
        # The default value is '$vardir/log'.
        logdir = /var/log/puppet
    
        # Where Puppet PID files are kept.
        # The default value is '$vardir/run'.
        rundir = /var/run/puppet
    
        # Where SSL certificates are kept.
        # The default value is '$confdir/ssl'.
        ssldir = $vardir/ssl
    
    [agent]
        # The file in which puppetd stores a list of the classes
        # associated with the retrieved configuratiion.  Can be loaded in
        # the separate puppet executable using the --loadclasses
        # option.
        # The default value is '$confdir/classes.txt'.
        classfile = $vardir/classes.txt
        pluginsync = true
        report = true
        ignoreschedules = true
        daemon = false
        ca_server = satellite.example.com
        server = satellite.example.com
        environment = KT_Example_Org_Library_RHEL6Server_3
    
        # Where puppetd caches the local configuration.  An
        # extension indicating the cache format is added automatically.
        # The default value is '$confdir/localconfig'.
        localconfig = $vardir/localconfig
    重要

    environment パラメーターを Satellite Server からホストの Puppet 環境に設定します。Puppet 環境ラベルには、組織ラベル、ライフサイクル環境、コンテンツビュー名、およびコンテンツビュー ID が含まれます。Satellite 6 Web UI で Puppet 環境一覧を表示するには、Configure > Environments に移動します。

  2. ホスト上で Puppet エージェントを実行します。

    # puppet agent -t --server satellite.example.com
  3. Satellite Server Web インターフェースを使って Puppet クライアント用の SSL 証明書に署名します。

    1. Web インターフェースから Satellite Server にログインします。
    2. Infrastructure > Capsules を選択します。
    3. 必要なホストの右側にある Certificates をクリックします。
    4. Sign をクリックします。
    5. puppet agent コマンドを再度実行します。

      # puppet agent -t --server satellite.example.com
注記

ホストに Puppet エージェントが設定されている場合は、All Hosts に表示されますが、ホストは組織またはロケーションに割り当てられないため、Any Context が選択されている場合に限ります。