[AWS, EC2, EBS] resize ebs volume?

20 views
Skip to first unread message

Reiner Nippes

unread,
Jan 9, 2018, 4:19:58 AM1/9/18
to Ansible Project
Hi,

I wonder if this is a missing feature or a bug. We create ebs volumes via ec2_vol: task and "{{ discs }}" dictionary.

e.g.
-----
discs:
  /dev/xvdb:
    volume_size: "360"
    delete_on_termination: "true"
    volume_type: gp2

  /dev/xvdc:
    volume_size: "300"
    delete_on_termination: "true"
    volume_type: gp2
-----
- name: create gp2/magnetic volumes
  ec2_vol:
    region: "{{ region }}"
    instance: "{{ ansible_ec2_instance_id }}"
    device_name: "{{ item.key }}"
    volume_size: "{{ item.value.volume_size }}"
    volume_type: "{{ item.value.volume_type }}"
    encrypted: true
    delete_on_termination: "{{ item.value.delete_on_termination }}"
    tags:
      "Name": "{{ ec2_tags.Name }}"
  when:  item.value.volume_type != "io1"
  with_dict: "{{ discs }}"
  delegate_to: 127.0.0.1
-----


Now I would like to change the volume size of xvdb from 360gb to 400gb. But if I change the entry in the discs dictionary and rerun the ec2_vol task nothing happens.

My mistake or a bug?
(ansible 2.4.2.0 on centos 7)
Reply all
Reply to author
Forward
0 new messages