-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathsite.step-10-infrastructure-aws.yml
61 lines (59 loc) · 2.6 KB
/
site.step-10-infrastructure-aws.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
49
50
51
52
53
54
55
56
57
58
59
60
61
- hosts: localhost
connection: local
gather_facts: false
pre_tasks:
- name: Collect minimum facts (we need date time stuff)
setup:
gather_subset: min
roles:
- role: cs.aws-vpc
- role: cs.aws-security-group
aws_security_group_rds_create: "{{ aws_rds_create }}"
aws_security_group_redis_create: "{{ mageops_redis_create or mageops_redis_sessions_create }}"
aws_security_group_rabbitmq_create: "{{ mageops_rabbitmq_create and magento_rabbitmq_queue }}"
aws_security_group_elasticsearch_create: "{{ mageops_elasticsearch_create }}"
- role: cs.aws-s3
- role: cs.aws-cloudfront
when: aws_cloudfront_distribution_create | bool
- role: cs.aws-ses
ses_email: "{{ mageops_email_ses_address | default(none, true) }}"
ses_domain: "{{ mageops_email_ses_domain | default(none, true) }}"
when: mageops_email_use_ses
- role: cs.aws-rds
when: aws_rds_create
- role: cs.aws-loadbalancer
lb_ssl_cert: "{{ aws_elb_https_certificate_arn }}"
lb_s3_logs_bucket: "{{ aws_s3_secret_bucket }}"
lb_http_port: "{{ mageops_varnish_port }}"
when: aws_elb_create
- role: cs.aws-ami-facts
ami_facts_instance: "{{ aws_varnish_node_instance_type }}"
- role: cs.aws-ami-facts
ami_facts_instance: "{{ aws_persistent_node_instance_type }}"
- role: cs.aws-node-facts
- role: cs.aws-node-varnish
aws_varnish_node_root_device: "{{ aws_ami_clean_base_info[aws_varnish_node_instance_type].root_device_name }}"
aws_varnish_node_vpc_subnet_id: "{{ aws_vpc_subnet_id }}"
aws_varnish_instance_id: "{{ aws_varnish_node_instance.instance_id | default(false) }}"
when: varnish_standalone
- role: cs.aws-node-persistent
aws_persistent_node_root_device: "{{ aws_ami_clean_base_info[aws_persistent_node_instance_type].root_device_name }}"
aws_persistent_node_vpc_subnet_id: "{{ aws_vpc_subnet_id }}"
aws_persistent_instance_id: "{{ aws_persistent_node_instance.instance_id | default(false) }}"
when: aws_persistent_node_create
- role: cs.mysql-configure
mysql_user_localhost_access: "{{ not aws_rds_create }}"
when: aws_rds_create or mageops_mysql_host is not none
- role: cs.aws-lambda-varnish
when: varnish_standalone
- role: cs.aws-lambda-node-coordinator
when: aws_magento_cron_enabled
- role: cs.aws-lambda-import
- role: cs.pio
vars:
pio_tasks: aws_infrastructure
when: mageops_pio_worker_enable
- role: cs.finalize
tasks:
- name: Refresh inventory to get info about newly created nodes
meta: refresh_inventory