2.3. インベントリーファイルの設定

Red Hat Ansible Automation Platform インストールをアップグレードする前に、希望の設定に一致するように inventory ファイルを編集します。既存の Ansible Automation Platform デプロイメントと同じパラメーターを維持するか、使用環境に合わせてパラメーターを変更できます。

手順

  1. インストールプログラムディレクトリーに移動します。

    バンドルのインストーラー
    $ cd ansible-automation-platform-setup-bundle-2.4-1-x86_64
    オンラインインストーラー
    $ cd ansible-automation-platform-setup-2.4-1
  2. 編集する inventory ファイルを開きます。
  3. inventory ファイルを変更して、新規ノードのプロビジョニング、ノードまたはグループのプロビジョニング解除、および自動化ハブ API トークンのインポートまたは生成を行います。

    環境に変更を加えない場合は、既存の Ansible Automation Platform 2.1 インストールから同じ inventory ファイルを使用できます。

    注記

    [automationhub] および [automationcontroller] ホストに到達可能な IP アドレスまたは完全修飾ドメイン名 (FDQN) を提供して、ユーザーが別のノードの Ansible Automation Hub からコンテンツを同期してインストールできるようにします。localhost は使用しないでください。localhost が使用されている 場合は、アップグレードがプリフライトチェックの一部として停止します。

クラスター内での新規ノードのプロビジョニング

  • 以下のように inventory ファイルの既存ノードとともに新規ノードを追加します。

    [controller]
    clusternode1.example.com
    clusternode2.example.com
    clusternode3.example.com
    
    [all:vars]
    admin_password='password'
    
    pg_host=''
    pg_port=''
    
    pg_database='<database_name>'
    pg_username='<your_username>'
    pg_password='<your_password>'

クラスター内のノードまたはグループのプロビジョニング解除

  • inventory ファイルのノードまたはグループに node_state-deprovision を追加します。

API トークンのインポートと生成

Red Hat Ansible Automation Platform 2.0 以前から Red Hat Ansible Automation Platform 2.1 以降にアップグレードする場合、既存の Automation Hub API トークンを使用することも、新しいトークンを生成することもできます。インベントリーファイルで、Red Hat Ansible Automation Platform インストーラーのセットアップスクリプト setup.sh を実行する前に、以下のいずれかのフィールドを編集します。

  • 以下のように automationhub_api_token フラグを使用して既存の API トークンをインポートします。

    automationhub_api_token=<api_token>
  • 以下のように generate_automationhub_token フラグを使用して、新しい API トークンを生成し、既存のトークンを無効にします。

    generate_automationhub_token=True