在我的Ansible Playbook的這個片段中,我在instance_tags
部分標記了EC2實例本身,但是有什麼方法可以標記創建的卷嗎?Ansible在EC2上創建標記卷
在文檔(http://docs.ansible.com/ansible/latest/ec2_module.html)中,似乎答案是否定的,但我想在此問一下以確認。
tasks:
- name: EC2 Instance
ec2:
aws_access_key: <hidden>
aws_secret_key: <hidden>
instance_type: c4.4xlarge
image: ami-221ea342
monitoring: yes
region: us-west-2
wait: yes
volumes:
- device_name: /dev/xvda
volume_type: gp2
volume_size: 80
- device_name: /dev/xvdf
volume_type: gp2
volume_size: 500
exact_count: 2
count_tag:
Component: "MyEC2"
Environment: Production
<snip>
instance_tags:
Component: "MyEC2"
Environment: Production
<snip>