|
23 | 23 | when: |
24 | 24 | - oracle_databases is defined |
25 | 25 | - odb.0.state == 'present' |
| 26 | + - oracledb_facts[_oracle_db_unique_name]['state'] | default('') == 'present' |
26 | 27 | - (odb.1.grants is defined or odb.1.object_privs is defined) |
27 | 28 | run_once: "{{ _oraswgi_meta_configure_cluster }}" |
28 | 29 | become: true |
29 | 30 | become_user: "{{ oracle_user }}" |
30 | 31 | loop_control: |
31 | 32 | loop_var: odb |
32 | 33 | label: >- |
| 34 | + db_name: {{ odb.0.oracle_db_name | default('') }} |
33 | 35 | service: {{ _db_service_name }}:{{ _listener_port_cdb }} |
34 | 36 | role: {{ odb.1.name | default('') }} |
35 | 37 | grants: {{ odb.1.grants | default('') }} |
36 | 38 | state: {{ odb.1.state | default('') }} |
| 39 | + db_state: {{ oracledb_facts[_oracle_db_unique_name]['state'] | default('') }} |
37 | 40 | tags: |
38 | 41 | - users |
39 | 42 | - grants |
|
62 | 65 | - oracle_pdbs is defined |
63 | 66 | - opdb.0 is defined |
64 | 67 | - opdb.0.state == 'present' |
| 68 | + - oracledb_facts[_oracle_db_unique_name]['state'] | default('') == 'present' |
65 | 69 | - (opdb.1.grants is defined or opdb.1.object_privs is defined) |
66 | 70 | - >- |
67 | 71 | oracle_databases | selectattr('oracle_db_name', 'equalto', opdb.0.cdb) |
|
72 | 76 | loop_control: |
73 | 77 | loop_var: opdb |
74 | 78 | label: >- |
| 79 | + cdb: {{ opdb.0.cdb | default('') }} |
75 | 80 | port: {{ _listener_port_pdb }}, |
76 | 81 | pdb: {{ opdb.0.pdb_name }}, |
77 | 82 | role: {{ opdb.1.name | default('none') }}, |
78 | 83 | grants: {{ opdb.1.grants | default(omit) }}, |
79 | 84 | state: {{ opdb.1.state }} |
| 85 | + cdb_state: {{ oracledb_facts[_oracle_db_unique_name]['state'] | default('') }} |
80 | 86 | tags: |
81 | 87 | - users |
82 | 88 | - grants2 |
|
106 | 112 | when: |
107 | 113 | - oracle_databases is defined |
108 | 114 | - odb.0.state == 'present' |
| 115 | + - oracledb_facts[_oracle_db_unique_name]['state'] | default('') == 'present' |
109 | 116 | - (odb.1.grants is defined or odb.1.object_privs is defined) |
110 | 117 | run_once: "{{ _oraswgi_meta_configure_cluster }}" |
111 | 118 | become: true |
112 | 119 | become_user: "{{ oracle_user }}" |
113 | 120 | loop_control: |
114 | 121 | loop_var: odb |
115 | 122 | label: >- |
| 123 | + db_name: {{ odb.0.oracle_db_name | default('') }} |
116 | 124 | service: {{ _db_service_name }}:{{ _listener_port_cdb }} |
117 | 125 | schema: {{ odb.1.schema | default('') }} |
118 | 126 | grants: {{ odb.1.grants | default('') }} |
119 | 127 | state: {{ odb.1.state | default('') }}" |
| 128 | + db_state: {{ oracledb_facts[_oracle_db_unique_name]['state'] | default('') }} |
120 | 129 | tags: |
121 | 130 | - users |
122 | 131 | - grants |
|
145 | 154 | - oracle_pdbs is defined |
146 | 155 | - opdb.0 is defined |
147 | 156 | - opdb.0.state == 'present' |
| 157 | + - oracledb_facts[_oracle_db_unique_name]['state'] | default('') == 'present' |
148 | 158 | - (opdb.1.grants is defined or opdb.1.object_privs is defined) |
149 | 159 | - >- |
150 | 160 | oracle_databases | selectattr('oracle_db_name', 'equalto', opdb.0.cdb) |
|
155 | 165 | loop_control: |
156 | 166 | loop_var: opdb |
157 | 167 | label: >- |
| 168 | + cdb: {{ opdb.0.cdb | default('') }} |
158 | 169 | port: {{ _listener_port_pdb }}, |
159 | 170 | pdb: {{ opdb.0.pdb_name }}, |
160 | 171 | schema: {{ opdb.1.schema | default('none') }}, |
161 | 172 | grants: {{ opdb.1.grants | default(omit) }}, |
162 | 173 | state: {{ opdb.1.state }} |
| 174 | + cdb_state: {{ oracledb_facts[_oracle_db_unique_name]['state'] | default('') }} |
163 | 175 | tags: |
164 | 176 | - users |
165 | 177 | - grants4 |
0 commit comments