付録C Ansible インベントリー場所の設定
オプションとして、ceph-ansible ステージング環境および実稼働環境用のインベントリーの場所ファイルを設定することができます。
前提条件
- Ansible 管理ノード。
- Ansible 管理ノードへの root レベルのアクセス。
-
ceph-ansibleパッケージがノードにインストールされている。
手順
/usr/share/ceph-ansibleディレクトリーに移動します。[ansible@admin ~]# cd /usr/share/ceph-ansibleステージングおよび実稼働環境用のサブディレクトリーを作成します。
[ansible@admin ceph-ansible]$ mkdir -p inventory/staging inventory/productionansible.cfgファイルを編集し、以下の行を追加します。[defaults] inventory = ./inventory/staging # Assign a default inventory directory各環境用にインベントリーの hosts ファイルを作成します。
[ansible@admin ceph-ansible]$ touch inventory/staging/hosts [ansible@admin ceph-ansible]$ touch inventory/production/hosts各
hostsファイルを開いて編集し、[mons]セクションの下に Ceph Monitor ノードを追加します。[mons] MONITOR_NODE_NAME_1 MONITOR_NODE_NAME_1 MONITOR_NODE_NAME_1例
[mons] mon-stage-node1 mon-stage-node2 mon-stage-node3注記デフォルトでは、Playbook はステージング環境で実行されます。実稼働環境で Playbook を実行するには、以下を実行します。
[ansible@admin ceph-ansible]$ ansible-playbook -i inventory/production playbook.yml
関連情報
-
ceph-ansibleパッケージのインストールに関する詳細は、Red Hat Storage Cluster のインストール を参照してください。