4.4. Playbook 依存関係のダウンロード
user-provisioned infrastructure でのインストールプロセスを簡素化する Ansible Playbook には、いくつかの Ansible コレクションと Python モジュールが必要です。インストールプログラムを実行するマシンに Red Hat OpenStack Platform (RHOSP) リポジトリーを追加し、パッケージをインストールします。
次の依存関係が必要です。
Python モジュール:
-
openstackclient -
openstacksdk -
netaddr -
pip
-
Ansible コレクション:
-
ansible-collections-openstackは Ansible Core をインストールします -
ansible-collection-community-general -
ansible-collection-ansible-netcommon
-
この手順では、Red Hat Enterprise Linux (RHEL) 8 を使用していることを前提としています。
前提条件
- Python 3 がマシンにインストールされている。
手順
コマンドラインで、リポジトリーを追加します。
Red Hat Subscription Manager に登録します。
$ sudo subscription-manager register # If not done already最新のサブスクリプションデータをプルします。
$ sudo subscription-manager attach --pool=$YOUR_POOLID # If not done already現在のリポジトリーを無効にします。
$ sudo subscription-manager repos --disable=* # If not done already必要なリポジトリーを追加します。
$ sudo subscription-manager repos \ --enable=rhel-9-for-x86_64-appstream-rpms \ --enable=rhel-9-for-x86_64-baseos-rpms \ --enable=openstack-17.1-for-rhel-9-x86_64-rpms
モジュールをインストールします。
$ sudo dnf install ansible-collection-ansible-netcommon \ ansible-collection-community-general \ ansible-collections-openstack \ python3-netaddr \ python3-openstackclient \ python3-openstacksdk \ python3-pippythonコマンドがpython3を参照していることを確認します。$ sudo alternatives --set python /usr/bin/python3