forked from mageops/ansible-infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
site.step-30-builder.yml
49 lines (48 loc) · 1.82 KB
/
site.step-30-builder.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
- hosts: localhost
connection: local
roles:
- role: cs.aws-security-group-facts
- role: cs.aws-node-state
node_state_target: absent
node_state_instance_tags: >-
{{
aws_tags_base | combine(
aws_tags_role_app,
aws_tags_role_app_builder
)
}}
when: aws_ami_build_force_fresh_builder or aws_ami_force_clean_build
- role: cs.aws-node-ami-builder
builder_base_ami_id: >-
{{
aws_app_node_base_ami_id_forced | default(
aws_ami_force_clean_build | ternary(
aws_ami_clean_base_id,
aws_ami_app_node_id | default(aws_ami_clean_base_id, true)
),
true
)
}}
builder_instance_vpc_subnet_id: "{{ aws_vpc_subnet_id }}"
builder_instance_inventory_group: app
builder_instance_name: "{{ mageops_app_name }}-builder-app"
builder_instance_type: "{{ aws_app_builder_node_instance_type }}"
builder_instance_volume_size: "{{ aws_app_node_ebs_volume_size }}"
builder_instance_ssh_key_name: "{{ aws_ec2_ssh_key_name }}"
builder_instance_iam_role: "{{ aws_iam_role_app_node }}"
builder_instance_user_data: "{{ aws_ec2_instance_user_data }}"
builder_instance_root_device: "{{ aws_ami_root_device }}"
builder_instance_security_groups:
- "{{ aws_security_group_app_id }}"
- "{{ aws_security_group_ssh_id }}"
builder_instance_tags: >-
{{
aws_tags_default | combine(
aws_tags_role_app,
aws_tags_role_app_builder,
varnish_is_in_autoscaling_group | ternary(aws_tags_role_varnish_http_cache, [])
)
}}
tasks:
- name: Refresh inventory to get info about current builder nodes
meta: refresh_inventory