2.7. 入力ファイルを使用した新しい Red Hat コンテンツリポジトリーの追加
Red Hat Update Infrastructure 4.2 以降では、設定された YAML 入力ファイルを使用してカスタムリポジトリーを追加できます。YAML ファイルのテンプレート例は、RHUA ノードの /usr/share/rhui-tools/examples/repo_add_by_file.yaml ディレクトリーにあります。
この機能はコマンドラインインターフェイス (CLI) でのみ利用できます。
前提条件
- RHUA ノードへの root のアクセス権がある。
手順
RHUA ノードで、以下の形式で YAML 入力ファイルを作成します。
# cat /root/example.yaml name: Example_YAML_File repo_ids: - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.1 - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.2 - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.4 - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.6rhui-managerユーティリティーを使用して、入力ファイルに一覧表示されているリポジトリーを追加します。# rhui-manager repo add_by_file --file /root/example.yaml --sync_now The name of the repos being added: Example_YAML_File Loading latest entitled products from Red Hat... ... listings loaded Successfully added Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs) (8.1) (Yum) Successfully added Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs) (8.2) (Yum) Successfully added Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs) (8.4) (Yum) Successfully added Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs) (8.6) (Yum) ... successfully scheduled for the next available timeslot. ... successfully scheduled for the next available timeslot. ... successfully scheduled for the next available timeslot. ... successfully scheduled for the next available timeslot.
検証
CLI で、以下のコマンドを使用してインストールされたリポジトリーの一覧を表示し、正しいリポジトリーがインストールされているかどうかを確認します。
# rhui-manager repo list-
RHUI 管理ツールのリポジトリー管理画面で、
lを押して、インストールされているすべてのリポジトリーを一覧表示し、正しいリポジトリーがインストールされているかどうかを確認します。