-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathinstall.yml
89 lines (77 loc) · 2.97 KB
/
install.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#
# init
#
- name: "init"
hosts: localhost
connection: local
gather_facts: true
tags:
- always
tasks:
- name: "set a state fact"
ansible.builtin.set_fact:
state: present
# - name: "include variables"
# ansible.builtin.include_vars:
# dir: vars/
- ansible.builtin.set_fact:
ansible_python_interpreter: ./virtualenv/bin/python
staging_dir: "{{ playbook_dir }}/staging"
- name: "get the aws account id"
aws_caller_info:
register: _aws_caller_info
- ansible.builtin.set_fact:
aws_account_id: "{{ _aws_caller_info.account }}"
- hosts: "all"
connection: "local"
# vars_files:
# - vars/main.yaml
roles:
- name: roles/_vars
- name: roles/network_math
# - name: roles/tgw_create
# when: rosa_tgw_enabled | bool
# - name: roles/egress_vpc_create
# when: rosa_egress_vpc_enabled | bool
- name: roles/rosa_vpc
vars:
rosa_vpc:
name: "rosa-{{ cluster_name }}-vpc"
region: "{{ rosa_region }}"
cidr: "{{ rosa_vpc_cidr }}"
tgw_id: "{{ tgw_id | default('')}}"
private_subnets: "{{ rosa_vpc_private_subnets }}"
public_subnets: "{{ rosa_vpc_public_subnets }}"
extra_tags: "{{ extra_tags }}"
endpoints:
gateway_endpoints: [s3]
interface_endpoints: [sts,ec2,elasticloadbalancing]
when: rosa_subnet_ids | default([]) | length == 0
- name: roles/rosa_account_roles
vars:
rosa_account_roles:
hosted_cp: "{{ rosa_hosted_cp }}"
version: "{{ rosa_account_roles_version }}"
prefix: "{{ rosa_account_roles_prefix }}"
- name: roles/rosa_cluster
vars:
rosa_cluster:
name: "{{ cluster_name }}"
aws_account_id: "{{ aws_account_id }}"
account_roles_prefix: "{{ rosa_account_roles_prefix }}"
region: "{{ rosa_region }}"
private_link: "{{ rosa_private_link }}"
vpc_cidr: "{{ rosa_vpc_cidr }}"
multi_az: "{{ rosa_multi_az }}"
version: "{{ rosa_version }}"
hosted_cp: "{{ rosa_hosted_cp }}"
min_replicas: "{{ rosa_min_replicas }}"
max_replicas: "{{ rosa_max_replicas }}"
compute_nodes: "{{ rosa_compute_nodes | default(rosa_multi_az | ternary('3', '2')) }}"
compute_machine_type: "m5.xlarge"
kms_key_arn: "{{ rosa_kms_key_arn }}"
tags: "{{ extra_tags }}"
http_proxy: "{{ proxy_enabled | bool | ternary('http://'+(proxy_private_ip|default(''))+':3128', omit) }}"
https_proxy: "{{ proxy_enabled | bool | ternary('http://'+(proxy_private_ip|default(''))+':3128', omit) }}"
additional_trust_bundle_file: "{{ proxy_enabled | bool | ternary('roles/proxy_create/files/squid-ca-cert.pem', omit) }}" # "roles/proxy_create/files/squid-ca-cert.pem"
no_proxy: "{{ proxy_enabled | bool | ternary(rosa_no_proxy|default(None), omit) }}"