SathiyarajPeriyannan.vsphere
ansible-role-vsphere
VMware仮想化環境で仮想マシンを作成するためのAnsibleロールです。
仮想マシンのIPアドレスは、他のロールやプレイブックでの使用のために在庫ファイルに更新されます。
要件
Ansibleマシンにpysphereパッケージがインストールされていること。
VMware vCenter環境が設定され、利用可能であること。
デプロイメント用に仮想マシンのテンプレートバージョンがvCenterに存在すること。
ロール変数
使用可能な変数は以下の通りです。
vsphere_vcenter_hostname: "vcenter1"
vsphere_vcenter_username: "root"
vsphere_vcenter_password: "passwd"
VCenterサーバー名/IPアドレスおよびvCenterサーバーへの接続に必要な資格情報。vsphere_datacenter_name: "datacenter1"
vsphere_esxi_host: "esx1"
仮想マシンが作成されるデータセンターと、仮想マシンを関連付けるESXiサーバー。vsphere_datastore_name: "datastore1"
仮想マシンのハードディスクが保存されるデータストアの名前。vsphere_template_name: "centos_template"
インストールされるOSイメージテンプレート。
在庫ファイルのホスト変数は、デフォルト値とともに以下に示されています。
[hosts]
在庫ファイル内の仮想マシン名のリストを集めるためのグループ名。cpu=2 memory=4096 disk=20
必要な仮想マシンの名前、必要な仮想CPUの数、メモリサイズ(MB)、ディスクサイズ(GB)。
依存関係
なし。
サンプルプレイブック
- hosts: hosts
connection: local
vars:
vsphere_vcenter_hostname: "vcenter1"
vsphere_vcenter_username: "root"
vsphere_vcenter_password: "passwd"
vsphere_datacenter_name: "datacenter1"
vsphere_esxi_host: "esx1"
vsphere_datastore_name: "datastore1"
vsphere_template_name: "centos_template"
roles:
- SathiyarajPeriyannan.vsphere
ライセンス
BSD
著者情報
このロールは2016年にSathiyaraj Periyannanによって作成されました。
Virtual Machine creation in vCenter environment
ansible-galaxy install SathiyarajPeriyannan.vsphere