0
當我嘗試使用ec2_vol
模塊指定快照ID時,會創建快照但它不返回卷ID。我在GitHub關於已知bug的討論中看到了幾篇文章,但用例幾乎沒有什麼不同。有什麼解決辦法嗎?使用Ansible從快照創建新的EBS卷不會返回卷ID
- name: Volume Creation
ec2_vol:
snapshot: "snap-1234"
zone: us-east-1a
region: us-east-1
volume_size: 50
volume_type: gp2
register: newebsvolume
- debug: var= newebsvolume
結果
ok: [localhost] => {
"var": {
"newebsvolume": {
"changed": false,
"invocation": {
"module_args": "",
"module_complex_args": {
"region": "us-east-1",
"snapshot": "snap-12345",
"state": "present",
"volume_size": 50,
"volume_type": "gp2",
"zone": "us-east-1a"
},
"module_name": "ec2_vol"
}
}
}
}
多數民衆贊成在我的Mac中的奇怪有效版本是1.9.4 –
看看編輯我的答案。 –
有道理 - 但劇本導致創建新卷。我看到了這種情況 - 是否有獲取該結果的黑客攻擊?不在同一遍 - 但運行另一個模塊與列表來獲取? –