radify / radiian

Radiian creates Ansible provisioning files for immutable infrastructure on AWS
https://www.npmjs.com/package/radiian
BSD 3-Clause "New" or "Revised" License
19 stars 2 forks source link

Switch ec2 task to key:value format #74

Closed gavD closed 8 years ago

gavD commented 8 years ago

The playbook generates stuff like:

  - name: Launch Instance
    ec2:
      image: 'ami-47a23a30'
      instance_type="{{ instance_type }}"
      keypair='hello-world'
      instance_tags='{"Environment":"hw","Class":"hw-immutable","Name":"hw (immutable)"}'
      region='{{ region }}'
      aws_zone='{{ region }}{{ aws_zone }}'
      group_id='< redacted >'
      wait=true
    register: ec2_info

This format is nicer:

  - name: Launch Instance
    ec2:
      image: 'ami-fce3c696'
      instance_type: "{{ instance_type }}"
      keypair: 'hello-world'
      instance_tags:
        Environment:"hw"
        Name: "hw (immutable)"
      region: '{{ region }}'
      aws_zone: '{{ region }}{{ aws_zone }}'
      group_id: '< redacted >'
      vpc_subnet_id: '< redacted >'
      wait: true
      assign_public_ip: true
    register: ec2_info