-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovision_master.yml
30 lines (30 loc) · 1007 Bytes
/
provision_master.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
- name: Provision Master
hosts: localhost
gather_facts: false
tasks:
- name: Include variables
include_vars: all.yml
- name: Launch configuration is present
ec2_lc:
name: KubeMaster {{ master_ami_id }}
image_id: "{{ master_ami_id }}"
instance_profile_name: KubeMaster
instance_type: t2.micro
key_name: "{{ ec2_keypair }}"
region: "{{ vpc_region }}"
register: lc_out
- name: ASG is present
ec2_asg:
name: KubeMaster
min_size: "{{ kubernetes.master_count }}"
max_size: "{{ kubernetes.master_count }}"
desired_capacity: "{{ kubernetes.master_count }}"
launch_config_name: "{{ lc_out.name }}"
region: "{{ vpc_region }}"
vpc_zone_identifier: "{{ vpc_kubernetes_subnets | map(attribute='id') | list }}"
load_balancers:
- kubernetes
tags:
- role: master
- os: coreos
- KubernetesCluster: "{{ kubernetes.name }}"