简体   繁体   中英

Ansible ec2 module ignores “volumes” parameter

I'm trying to get Ansible to bring up new ec2 boxes for me with a volume size larger than the default ~8g. I've added the volumes option with volume_size specified, but when I run with that, the volumes option seems to be ignored and I still get a new box with ~8g. The relevant part of my playbook is as follows:

- name: provision new boxes
  hosts: localhost
  gather_facts: False
  tasks:
    - name: Provision a set of instances
      ec2:
        group: "{{ aws_security_group }}"
        instance_type: "{{ aws_instance_type }}"
        image: "{{ aws_ami_id }}"
        region: "{{ aws_region }}"
        vpc_subnet_id: "{{ aws_vpc_subnet_id }}"
        key_name: "{{ aws_key_name }}"
        wait: true
        count: "{{ num_machines }}"
        instance_tags: "{{ tags }}"
        volumes:
        - device_name: /dev/sda1
          volume_size: 15
      register: ec2

What am I doing wrong?

So, I just updated ansible to 1.9.4 and now all of a sudden it works. So there's my answer. The code above is fine. Ansible was just broken.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM