-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathconfig-db.yml
More file actions
119 lines (107 loc) · 3.37 KB
/
config-db.yml
File metadata and controls
119 lines (107 loc) · 3.37 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
- name: Playbook pre_tasks
hosts: dbasm
gather_facts: false
remote_user: "{{ oracle_user }}"
become: true
become_user: root
pre_tasks:
- name: Check environment readiness
include_role:
name: common
tasks_from: readiness_checks.yml
vars:
control_node_checks: true
managed_host_checks: true
become_user_check: root
tags: readiness_checks
- name: Display is_standby_node status
debug:
msg: "This node is identified as a standby node: {{ is_standby_node | default(false) }}"
tasks:
- include_role:
name: lsnr-create
when: create_listener | bool
tags: lsnr-create
- include_role:
name: "{{ role_item }}"
tasks_from: main
loop:
- db-create
- db-adjustments
- db-backups
- validation-scripts
loop_control:
loop_var: role_item
when:
- create_db | bool
- cluster_type != "RAC"
- not is_standby_node | default(false)
tags: primary-db
- name: Skip installation of Google Cloud Agent for Compute Workloads if non-RHEL OS detected
debug:
msg: "Non-RHEL OS detected. Skipping the installation of Google Cloud Agent for Compute Workloads."
verbosity: 0
when: ansible_os_family != "RedHat"
tags: workload-agent
- name: Skip installation of Google Cloud Agent for Compute Workloads if non-GCE environment detected
debug:
msg: "Non-GCE environment detected. Skipping the installation of Google Cloud Agent for Compute Workloads."
verbosity: 0
when: ansible_facts['product_name'] != "Google Compute Engine"
tags: workload-agent
- include_role:
name: workload-agent
when:
- install_workload_agent | bool
- ansible_facts['product_name'] == "Google Compute Engine"
- ansible_os_family == "RedHat"
tags: workload-agent
- include_role:
name: db-copy
tasks_from: active-copy
when:
- create_db | bool
- cluster_type != "RAC"
- is_standby_node | default(false)
tags: active-duplicate
- include_role:
name: dg-config
tasks_from: main
when: cluster_type == "DG"
tags: dg-create
- include_role:
name: dg-config
tasks_from: dg_mode
when: cluster_type == "DG"
tags: dg-create,dg-mode
- include_role:
name: db-start
when:
- cluster_type != "RAC"
- ora_disk_management == "fs"
- not free_edition
tags: db-start
- name: Get and Log Oracle DBID
hosts: dbasm
remote_user: "{{ oracle_user }}"
become: true
become_user: oracle
tasks:
- name: Include DBID logging role for current database instance
include_role:
name: dbid-logger
tags: log-dbid