diff options
author | Thomas Wiest <twiest@users.noreply.github.com> | 2015-04-24 12:06:07 -0400 |
---|---|---|
committer | Thomas Wiest <twiest@users.noreply.github.com> | 2015-04-24 12:06:07 -0400 |
commit | b3b2039086bb380bc76172ec39a97f1d447ac412 (patch) | |
tree | 117c8aea45d5bf7199870403a7210505a1d686dd /playbooks/aws/openshift-cluster/tasks | |
parent | b1105112be18f6e1f3cd5b268881f46a2a6ad229 (diff) | |
parent | 378e8a8c9d7e7be7f52691e957f07096ee0b2c82 (diff) | |
download | openshift-b3b2039086bb380bc76172ec39a97f1d447ac412.tar.gz openshift-b3b2039086bb380bc76172ec39a97f1d447ac412.tar.bz2 openshift-b3b2039086bb380bc76172ec39a97f1d447ac412.tar.xz openshift-b3b2039086bb380bc76172ec39a97f1d447ac412.zip |
Merge pull request #167 from detiber/aws-lvm-direct
lvm-direct support for aws
Diffstat (limited to 'playbooks/aws/openshift-cluster/tasks')
-rw-r--r-- | playbooks/aws/openshift-cluster/tasks/launch_instances.yml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml index 39ad9d089..666a8d1fb 100644 --- a/playbooks/aws/openshift-cluster/tasks/launch_instances.yml +++ b/playbooks/aws/openshift-cluster/tasks/launch_instances.yml @@ -1,6 +1,7 @@ --- - set_fact: created_by: "{{ lookup('env', 'LOGNAME')|default(cluster, true) }}" + docker_vol_ephemeral: "{{ lookup('env', 'os_docker_vol_ephemeral') | default(false, true) }}" env: "{{ cluster }}" env_host_type: "{{ cluster }}-openshift-{{ type }}" host_type: "{{ type }}" @@ -50,6 +51,25 @@ - set_fact: latest_ami: "{{ ami_result.results | oo_ami_selector(ec2_image_name) }}" + user_data: "{{ lookup('template', '../templates/user_data.j2') if type == 'node' else None | default('omit') }}" + volume_defs: + master: + root: + volume_size: "{{ lookup('env', 'os_master_root_vol_size') | default(25, true) }}" + device_type: "{{ lookup('env', 'os_master_root_vol_type') | default('gp2', true) }}" + iops: "{{ lookup('env', 'os_master_root_vol_iops') | default(500, true) }}" + node: + root: + volume_size: "{{ lookup('env', 'os_node_root_vol_size') | default(25, true) }}" + device_type: "{{ lookup('env', 'os_node_root_vol_type') | default('gp2', true) }}" + iops: "{{ lookup('env', 'os_node_root_vol_iops') | default(500, true) }}" + docker: + volume_size: "{{ lookup('env', 'os_docker_vol_size') | default(32, true) }}" + device_type: "{{ lookup('env', 'os_docker_vol_type') | default('gp2', true) }}" + iops: "{{ lookup('env', 'os_docker_vol_iops') | default(500, true) }}" + +- set_fact: + volumes: "{{ volume_defs | oo_ec2_volume_definition(host_type, docker_vol_ephemeral | bool) }}" - name: Launch instance(s) ec2: @@ -62,12 +82,14 @@ count: "{{ instances | oo_len }}" vpc_subnet_id: "{{ ec2_vpc_subnet | default(omit, true) }}" assign_public_ip: "{{ ec2_assign_public_ip | default(omit, true) }}" + user_data: "{{ user_data }}" wait: yes instance_tags: created-by: "{{ created_by }}" env: "{{ env }}" host-type: "{{ host_type }}" env-host-type: "{{ env_host_type }}" + volumes: "{{ volumes }}" register: ec2 - name: Add Name tag to instances |