-
Notifications
You must be signed in to change notification settings - Fork 15
/
uninstall.yml
64 lines (55 loc) · 1.6 KB
/
uninstall.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
#
# init
#
- name: "init"
hosts: localhost
connection: local
gather_facts: false
tags:
- always
tasks:
- name: "set a state fact"
ansible.builtin.set_fact:
state: absent
# - 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_cluster
vars:
rosa_cluster:
name: "{{ cluster_name }}"
aws_account_id: "{{ aws_account_id }}"
- 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_vpc
vars:
rosa_vpc:
name: "rosa-{{ cluster_name }}-vpc"
region: "{{ rosa_region }}"
cidr: "{{ rosa_vpc_cidr }}"
tgw_id: "{{ tgw_id | default('')}}"
endpoints_enabled: True
when: rosa_subnet_ids | default([]) | length == 0