The problem is that you cannot normally target the installation process on the disk the instance is booted from.
On AWS, and additional EBS disk can be attached to the instance and used as the target installation device.
This first post will quickly explain how the process can be fully automated using the following tools:
A second post will soon describe how to customize the installation.
The process is the following:
Create a helper instance from an existing AMI (Amazon Linux) from the AWS Marketplace
Attach an 4GB EBS disk to it
Fetch the self-contained installation script from the github repository
Run it with the appropriate arguments to install the OSE on the EBS disk
Create a snapshot of the EBS disk on which CoreOs has been installed
Terminate the helper instance to avoid costs
Register an AMI from the snapshot
There are many ways to use Ansible. Here is a simple sequential playbook to illustrate the process. Define your own account-specific parameters and adapt to your region.
It currently depends on the following https://github.com/ansible/ansible-modules-core/pull/4075.