[英]How to add a disk to a Google Compute Engine instance with the gce_pd Ansible module?
[英]How to add a SSD disk to a google compute engine instance with Ansible?
Ansible具有gce_pd模塊: http ://docs.ansible.com/gce_pd_module.html。 根據文檔,您可以指定大小和模式(READ,READ-WRITE),但不能指定類型(SSD與標准)。 是否可以使用gce_pd模塊創建SSD磁盤?
截至目前, https://github.com/ansible/ansible-modules-core/blob/devel/cloud/google/gce_pd.py根本沒有提及SSD
,因此似乎不支持SSD
。 如果這是您真正需要的,請考慮提交功能請求。
現在可以在Ansible中使用。
根據更新的官方文檔 ,在Ansible 1.9中添加了disk_type
disk_type
可以具有以下可能的值:
pd-standard
pd-ssd
這是一個例子:
# Simple attachment action to an existing instance
- local_action:
module: gce_pd
name: mongodata
instance_name: www1
size_gb: 30
disk_type: pd-ssd
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.