Skip to content

Commit 7580083

Browse files
committed
Turned all 'if xxx==True/False' into proper 'if xxx' & 'if not xxx'
1 parent ff468f6 commit 7580083

25 files changed

+84
-88
lines changed

roles/cxoracle/defaults/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@
66
oracle_home: "{% if item.oracle_home is defined %}{{ item.oracle_home }}{% else %}{{ oracle_base }}/{{ item.oracle_version_db }}/{{ item.home }}{% endif %}"
77
oracle_env:
88
ORACLE_HOME: "{{ oracle_home }}"
9-
extra_args: "{% if use_proxy==true %}--proxy={{ http_proxy }}{% else %}{% endif %}"
10-
9+
extra_args: "{% if use_proxy %}--proxy={{ http_proxy }}{% else %}{% endif %}"

roles/oraasm-createdg/defaults/main.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
oracle_user: oracle
44
grid_user: grid
5-
grid_install_user: "{% if role_separation==true %}{{ grid_user }}{% else %}{{ oracle_user }}{% endif %}"
5+
grid_install_user: "{% if role_separation %}{{ grid_user }}{% else %}{{ oracle_user }}{% endif %}"
66
oracle_group: oinstall
77
oracle_base: /u01/app/oracle
8-
oracle_home_gi: "{% if configure_cluster==True %}{{ oracle_home_gi_cl }}{% else %}{{ oracle_home_gi_so }}{% endif %}"
8+
oracle_home_gi: "{% if configure_cluster %}{{ oracle_home_gi_cl }}{% else %}{{ oracle_home_gi_so }}{% endif %}"
99
oracle_home_gi_cl: "/u01/app/{{ oracle_install_version_gi }}/grid" # ORACLE_HOME for Grid Infrastructure (Clustered)
1010
oracle_home_gi_so: "{{ oracle_base }}/{{ oracle_install_version_gi }}/grid" # ORACLE_HOME for Grid Infrastructure (Stand Alone)
1111
oracle_stage: /u01/stage
@@ -14,30 +14,30 @@
1414
device_persistence: asmlib
1515
oracle_asm_disk_string: "{% if device_persistence == 'asmlib' %}{% elif device_persistence == 'udev' %}/dev/oracle/{% else %}{% endif %}"
1616

17-
asm_diskgroups:
17+
asm_diskgroups:
1818
- diskgroup: crs
19-
properties:
19+
properties:
2020
- {redundancy: normal, ausize: 1}
21-
attributes:
21+
attributes:
2222
- {name: 'compatible.rdbms', value: 11.2.0.4.0}
2323
- {name: 'compatible.asm', value: 12.1.0.2.0}
2424
disk:
2525
- {device: /dev/sdc, asmlabel: crs01}
2626
- {device: /dev/sdd, asmlabel: crs02}
2727
- {device: /dev/sde, asmlabel: crs03}
2828
- diskgroup: data
29-
properties:
29+
properties:
3030
- {redundancy: external, ausize: 4}
31-
attributes:
31+
attributes:
3232
- {name: compatible.rdbms, value: 11.2.0.4.0}
3333
- {name: compatible.asm, value: 12.1.0.2.0}
3434
disk:
3535
- {device: /dev/sdf, asmlabel: data01}
3636
- diskgroup: fra
37-
properties:
37+
properties:
3838
- {redundancy: external, ausize: 4}
39-
attributes:
39+
attributes:
4040
- {name: compatible.rdbms, value: 11.2.0.4.0}
4141
- {name: compatible.asm, value: 12.1.0.2.0}
4242
disk:
43-
- {device: /dev/sdg, asmlabel: fra01}
43+
- {device: /dev/sdg, asmlabel: fra01}

roles/oradb-create/templates/dbca-create-db.rsp.11.2.0.3.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ SID = "{{ item.0.oracle_db_name }}"
186186
# Mandatory : No (Yes for RAC database-centric database )
187187
#-----------------------------------------------------------------------------
188188

189-
{% if configure_cluster==True and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper == 'FLEX' %}
189+
{% if configure_cluster and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper == 'FLEX' %}
190190
NODELIST={% for host in groups[hostgroup_hub] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
191-
{% elif configure_cluster==True and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper != 'FLEX' %}
191+
{% elif configure_cluster and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper != 'FLEX' %}
192192
NODELIST={% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
193193
{% else %}
194194
#NODELIST=

roles/oradb-create/templates/dbca-create-db.rsp.11.2.0.4.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ SID = "{{ item.0.oracle_db_name }}"
187187
# Mandatory : No (Yes for RAC database-centric database )
188188
#-----------------------------------------------------------------------------
189189

190-
{% if configure_cluster==True and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper == 'FLEX' %}
190+
{% if configure_cluster and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper == 'FLEX' %}
191191
NODELIST={% for host in groups[hostgroup_hub] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
192-
{% elif configure_cluster==True and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper != 'FLEX' %}
192+
{% elif configure_cluster and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper != 'FLEX' %}
193193
NODELIST={% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
194194
{% else %}
195195
#NODELIST=

roles/oradb-create/templates/dbca-create-db.rsp.12.1.0.1.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ PDBADMINPASSWORD = "{{default_dbpass }}"
261261
# Default value : None
262262
# Mandatory : No (Yes for RAC database-centric database )
263263
#-----------------------------------------------------------------------------
264-
{% if configure_cluster==True and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper == 'FLEX' %}
264+
{% if configure_cluster and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper == 'FLEX' %}
265265
NODELIST={% for host in groups[hostgroup_hub] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
266-
{% elif configure_cluster==True and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper != 'FLEX' %}
266+
{% elif configure_cluster and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper != 'FLEX' %}
267267
NODELIST={% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
268268
{% else %}
269269
#NODELIST=

roles/oradb-create/templates/dbca-create-db.rsp.12.1.0.2.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ PDBADMINPASSWORD = "{{default_dbpass }}"
261261
# Default value : None
262262
# Mandatory : No (Yes for RAC database-centric database )
263263
#-----------------------------------------------------------------------------
264-
{% if configure_cluster==True and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper == 'FLEX' %}
264+
{% if configure_cluster and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper == 'FLEX' %}
265265
NODELIST={% for host in groups[hostgroup_hub] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
266-
{% elif configure_cluster==True and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper != 'FLEX' %}
266+
{% elif configure_cluster and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper != 'FLEX' %}
267267
NODELIST={% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
268268
{% else %}
269269
#NODELIST=

roles/oradb-create/templates/dbca-create-db.rsp.12.2.0.1.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,9 @@ pdbAdminPassword={{default_dbpass }}
217217
# Default value : None
218218
# Mandatory : No (Yes for RAC database-centric database )
219219
#-----------------------------------------------------------------------------
220-
{% if configure_cluster==True and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper == 'FLEX' %}
220+
{% if configure_cluster and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper == 'FLEX' %}
221221
nodelist={% for host in groups[hostgroup_hub] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
222-
{% elif configure_cluster==True and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper != 'FLEX' %}
222+
{% elif configure_cluster and item.0.oracle_db_type|upper != "SI" and item.0.oracle_db_type|upper != "SIFO" and oracle_gi_cluster_type |upper != 'FLEX' %}
223223
nodelist={% for host in groups[hostgroup] -%} {{host}} {%- if not loop.last -%} , {%- endif -%} {%- endfor %}
224224
{% else %}
225225
#NODELIST=

roles/orahost-logrotate/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ oracle_install_version_gi: 12.2.0.1
77
configure_cluster: False
88
oracle_home_gi_cl: "/u01/app/{{ oracle_install_version_gi }}/grid" # ORACLE_HOME for Grid Infrastructure (Clustered)
99
oracle_home_gi_so: "{{ oracle_base }}/{{ oracle_install_version_gi }}/grid" # ORACLE_HOME for Grid Infrastructure (Stand Alone)
10-
oracle_home_gi: "{% if configure_cluster==True %}{{ oracle_home_gi_cl }}{% else %}{{ oracle_home_gi_so }}{% endif %}"
10+
oracle_home_gi: "{% if configure_cluster %}{{ oracle_home_gi_cl }}{% else %}{{ oracle_home_gi_so }}{% endif %}"
1111

1212
oracle_cleanup_days: 14
1313
oracle_trace_cleanup_days: 7
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{% for disk in item.disk %}
22
{{ disk.device }} {{oracle_asm_disk_string.split("/",2)[-1] }}{{ disk.asmlabel }} {{ grid_install_user }} {{ asmadmin_group }}
3-
43
{% endfor %}

roles/orahost/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
role_separation: false
2828
oracle_user: oracle # User that will own the Oracle Installations.
2929
grid_user: grid
30-
grid_install_user: "{% if role_separation==true %}{{grid_user }}{% else %}{{ oracle_user }}{% endif %}"
30+
grid_install_user: "{% if role_separation %}{{grid_user }}{% else %}{{ oracle_user }}{% endif %}"
3131
configure_oracle_sudo: true
3232
etc_hosts_ip: "{% if 'virtualbox' in ansible_virtualization_type %}{{ansible_all_ipv4_addresses[1]}}{% else %}{{ansible_default_ipv4.address}}{%endif%}"
3333

@@ -87,7 +87,7 @@
8787
size_in_gb_hugepages: 1 # The amount of RAM in GB to dedicate to hugepages
8888
nr_hugepages_percent: "{{((((percent_hugepages/100) * ansible_memtotal_mb)/2)+2)|round|int }}"
8989
nr_hugepages_memory: "{{ (((size_in_gb_hugepages*1024)/2)+2)|round|int }}"
90-
nr_hugepages: "{% if configure_hugepages==True%}{% if configure_hugepages_by|lower == 'percentage'%}{{ nr_hugepages_percent }}{%elif configure_hugepages_by|lower == 'memory' %}{{ nr_hugepages_memory }}{% endif %}{% else %}0{% endif %}"
90+
nr_hugepages: "{% if configure_hugepages %}{% if configure_hugepages_by|lower == 'percentage'%}{{ nr_hugepages_percent }}{%elif configure_hugepages_by|lower == 'memory' %}{{ nr_hugepages_memory }}{% endif %}{% else %}0{% endif %}"
9191

9292
host_fs_layout:
9393
- vgname: vgora

0 commit comments

Comments
 (0)