Menu Close
6.2. 既存のクライアントへの設定の適用
Red Hat Satellite 6 でプロビジョニングされていない既存のクライアントに Puppet 設定を適用する必要がある場合があります。このような場合には、Red Hat Satellite 6 に登録した後に、既存のクライアントに Puppet をインストールして設定します。
既存のシステムを Red Hat Satellite 6 に登録します。既存のホストの登録に関する情報は、『ホスト の管理』 の 「ホストの登録 」を参照してください。
このパッケージは、Red Hat Satellite Tools 6.7 リポジトリーに含まれます。次のステップに進む前に、このリポジトリーを有効にするようにしてください。
Puppet エージェントをインストールし、有効にする方法:
- ホストでターミナルを開き、root でログインします。
Puppet エージェントをインストールします。
# yum install puppet
システムの起動時に Puppet エージェントが起動するように設定します。
Red Hat Enterprise Linux 6 の場合:
# chkconfig puppet on
Red Hat Enterprise Linux 7 の場合:
# systemctl enable puppet
Puppet エージェントの設定
/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重要Satellite Server から、
environment
パラメーターをホストの Puppet 環境に設定します。Puppet 環境ラベルには、組織ラベル、ライフサイクル環境、コンテンツビュー名、およびコンテンツビュー ID が含まれます。Satellite 6 Web UI の Puppet 環境の一覧を表示するには、Configure > Environments の順に移動します。ホスト上で Puppet エージェントを実行します。
# puppet agent -t --server satellite.example.com
Satellite Server Web インターフェースを使って Puppet クライアント用の SSL 証明書に署名します。
- Web UI から Satellite Server にログインします。
- インフラストラクチャー > Capsles を選択 し ます。
- 必要なホストの右側にある <guibutton>証明書</guibutton> をクリックします。
- Sign をクリックします。
puppet agent
コマンドを再度実行します。# puppet agent -t --server satellite.example.com
Puppet エージェントがホストに設定されている場合、All Hosts の下に一覧表示されますが、ホストは組織または場所に割り当てられないため、Context が選択される場合にのみ一覧表示されます。