summaryrefslogtreecommitdiffstats
path: root/roles/openshift_aws/tasks/launch_config_create.yml
blob: 8265c2179853cde5b4c67474bea38254f5a4dfd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
- name: fetch the security groups for launch config
  ec2_group_facts:
    filters:
      group-name: "{{ l_launch_config_security_groups[launch_config_item.key] }}"
      vpc-id: "{{ vpcout.vpcs[0].id }}"
    region: "{{ openshift_aws_region }}"
  register: ec2sgs

# Create the scale group config
- name: Create the node scale group launch config
  ec2_lc:
    name: "{{ openshift_aws_launch_config_basename }}-{{ launch_config_item.key }}-{{ l_epoch_time }}"
    region: "{{ openshift_aws_region }}"
    image_id: "{{ l_aws_ami_map[launch_config_item.key] | default(openshift_aws_ami) }}"
    instance_type: "{{ launch_config_item.value.instance_type }}"
    security_groups: "{{ openshift_aws_launch_config_security_group_id  | default(ec2sgs.security_groups | map(attribute='group_id')| list) }}"
    user_data: "{{ lookup('template', 'user_data.j2') }}"
    key_name: "{{ openshift_aws_ssh_key_name }}"
    ebs_optimized: False
    volumes: "{{ launch_config_item.value.volumes }}"
    assign_public_ip: True