Skip to content

Commit f202818

Browse files
committed
oraswgi_install: ansible-lint
1 parent 46b2062 commit f202818

File tree

12 files changed

+74
-74
lines changed

12 files changed

+74
-74
lines changed

roles/oraswgi_install/defaults/main.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ oracle_grid_responsefile: "grid-{{ oracle_cluster_name }}.rsp" # Name of respo
6969
default_gipass: "{% if oracle_password is defined %}{{ oracle_password }}{% else %}Oracle123{% endif %}"
7070

7171
# The check for the old passwords are there for backwards compatibility and only temporary, will be removed
72-
sysasmpassword: "{% if oracle_password is defined %}{{ oracle_password }}{% else %}Oracle123{% endif%}"
72+
sysasmpassword: "{% if oracle_password is defined %}{{ oracle_password }}{% else %}Oracle123{% endif %}"
7373

7474
# The check for the old passwords are there for backwards compatibility and only temporary, will be removed
7575
asmmonitorpassword: "{% if oracle_password is defined %}{{ oracle_password }}{% else %}Oracle123{% endif %}"
@@ -89,8 +89,8 @@ oracle_ic_net: 3.3.3.{{ ansible_all_ipv4_addresses[0].split(".")[-1] }}
8989
oracle_asm_init_dg: crs
9090
device_persistence: asmlib
9191
oracle_asm_disk_string: ORCL:*
92-
cvuqdisk_rpm: "{%- if oracle_install_version_gi > '12.1.0.2' -%}cvuqdisk-1.0.10-1.rpm
93-
{%- else -%}cvuqdisk-1.0.9-1.rpm
92+
cvuqdisk_rpm: "{%- if oracle_install_version_gi > '12.1.0.2' -%}cvuqdisk-1.0.10-1.rpm\
93+
{%- else -%}cvuqdisk-1.0.9-1.rpm\
9494
{%- endif -%}"
9595

9696
oracle_cluster_name: "{{ hostgroup }}" # Name of the cluster when setting up Clustered Grid Infrastructure
@@ -117,11 +117,11 @@ opatcharchive: "{{ oracle_stage_install }}/{{ oracle_install_version_gi }}/
117117
{%- for opatchfile in oracle_opatch_patch if opatchfile['version']==oracle_install_version_gi -%}{{ opatchfile['filename'] }}
118118
{%- endfor -%}"
119119

120-
oracle_gi_image: "{%- if oracle_sw_copy %}{{ oracle_stage }}
121-
{%- else %}{{ oracle_stage_remote }}
122-
{%- endif %}
123-
{%- if oracle_install_image_gi is defined %}/{{ oracle_install_image_gi }}
124-
{%- else %}//{{ item.filename }}
120+
oracle_gi_image: "{%- if oracle_sw_copy %}{{ oracle_stage }}\
121+
{%- else %}{{ oracle_stage_remote }}\
122+
{%- endif %}\
123+
{%- if oracle_install_image_gi is defined %}/{{ oracle_install_image_gi }}\
124+
{%- else %}//{{ item.filename }}\
125125
{%- endif %}"
126126

127127
oracle_sw_image_gi: # Files containing the installation media for Grid Infrastructure

roles/oraswgi_install/tasks/11.2.0.3.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
become_user: "{{ grid_install_user }}"
1212
tags:
1313
- oragridswunpack
14-
when: oracle_home_gi not in checkgiinstall.stdout and oracle_install_version_gi == item.version and oracle_sw_copy and oracle_sw_unpack
14+
when: oracle_home_gi not in checkgiinstall.stdout and oracle_install_version_gi == item.version and oracle_sw_copy and oracle_sw_unpack
1515

1616
- name: install_home_gi | Extract files to stage-area (GI) (from remote location)
1717
ansible.builtin.unarchive:
@@ -97,7 +97,7 @@
9797
ansible.builtin.shell: "sleep {{ item.0 * 60 }}; {{ oracle_home_gi }}/root.sh"
9898
# noqa command-instead-of-shell
9999
become: true
100-
with_indexed_items: "{{ groups[hostgroup] }}"
100+
with_indexed_items: "{{ groups[hostgroup] }}"
101101
tags:
102102
- runroot
103103
# when: oracle_home_gi not in checkgiinstall.stdout and inventory_hostname == item.1
@@ -121,7 +121,7 @@
121121
run_once: "{{ configure_cluster }}"
122122
tags:
123123
- responsefileconfigtool
124-
when: run_configtoolallcommand and oracle_home_gi not in checkgiinstall.stdout
124+
when: run_configtoolallcommand and oracle_home_gi not in checkgiinstall.stdout
125125

126126
- name: install_home_gi | Run configToolAllCommands
127127
ansible.builtin.shell: "{{ oracle_home_gi }}/cfgtoollogs/configToolAllCommands RESPONSE_FILE={{ oracle_rsp_stage }}/configtoolallcommands.rsp"

roles/oraswgi_install/tasks/11.2.0.4.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
become_user: "{{ grid_install_user }}"
1212
tags:
1313
- oragridswunpack
14-
when: oracle_home_gi not in checkgiinstall.stdout and oracle_install_version_gi == item.version and oracle_sw_copy and oracle_sw_unpack
14+
when: oracle_home_gi not in checkgiinstall.stdout and oracle_install_version_gi == item.version and oracle_sw_copy and oracle_sw_unpack
1515

1616
- name: install_home_gi | Extract files to stage-area (GI) (from remote location)
1717
ansible.builtin.unarchive:
@@ -119,7 +119,7 @@
119119
run_once: "{{ configure_cluster }}"
120120
tags:
121121
- responsefileconfigtool
122-
when: run_configtoolallcommand and oracle_home_gi not in checkgiinstall.stdout
122+
when: run_configtoolallcommand and oracle_home_gi not in checkgiinstall.stdout
123123

124124
- name: install_home_gi | Run configToolAllCommands
125125
ansible.builtin.shell: "{{ oracle_home_gi }}/cfgtoollogs/configToolAllCommands RESPONSE_FILE={{ oracle_rsp_stage }}/configtoolallcommands.rsp"

roles/oraswgi_install/tasks/12.1.0.1.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
become_user: "{{ grid_install_user }}"
1717
tags:
1818
- oragridswunpack
19-
when: oracle_home_gi not in checkgiinstall.stdout and oracle_install_version_gi == item.version and not oracle_sw_copy and oracle_sw_unpack
19+
when: oracle_home_gi not in checkgiinstall.stdout and oracle_install_version_gi == item.version and not oracle_sw_copy and oracle_sw_unpack
2020

2121
- name: install_home_gi | Install cvuqdisk rpm
2222
# noqa ignore-errors
@@ -111,7 +111,7 @@
111111
tags:
112112
- responsefileconfigtool
113113
run_once: "{{ configure_cluster }}"
114-
when: run_configtoolallcommand and oracle_home_gi not in checkgiinstall.stdout
114+
when: run_configtoolallcommand and oracle_home_gi not in checkgiinstall.stdout
115115

116116
- name: install_home_gi | Run configToolAllCommands
117117
ansible.builtin.shell: "{{ oracle_home_gi }}/cfgtoollogs/configToolAllCommands RESPONSE_FILE={{ oracle_rsp_stage }}/configtoolallcommands.rsp"

roles/oraswgi_install/tasks/12.1.0.2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
run_once: "{{ configure_cluster }}"
122122
tags:
123123
- responsefileconfigtool
124-
when: run_configtoolallcommand and oracle_home_gi not in checkgiinstall.stdout
124+
when: run_configtoolallcommand and oracle_home_gi not in checkgiinstall.stdout
125125

126126
- name: install_home_gi | Run configToolAllCommands
127127
ansible.builtin.shell: "{{ oracle_home_gi }}/cfgtoollogs/configToolAllCommands RESPONSE_FILE={{ oracle_rsp_stage }}/configtoolallcommands.rsp"

roles/oraswgi_install/tasks/18.3.0.0.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
- oragridinstall
104104
when: oracle_home_gi not in checkgiinstall.stdout # and oracle_sw_unpack
105105
register: giinstall
106-
failed_when: giinstall.rc not in [0,6]
106+
failed_when: giinstall.rc = not in [0, 6]
107107

108108
- ansible.builtin.debug: var=giinstall.stdout_lines
109109
# noqa unnamed-task

roles/oraswgi_install/tasks/19.3.0.0.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
---
2-
- block:
2+
- name: install_home_gi
3+
tags:
4+
- oragridswunpack
5+
when:
6+
- oracle_home_gi not in checkgiinstall.stdout
7+
block:
38
- ansible.builtin.debug: msg="install_home_gi | Start Extract files to ORACLE_HOME (gi)" # noqa unnamed-task
49
run_once: "{{ configure_cluster }}"
510

611
- name: install_home_gi | Extract files to ORACLE_HOME (gi)
712
ansible.builtin.unarchive: src={{ oracle_gi_image }} dest={{ oracle_home_gi }} copy=no
813
with_items: "{{ oracle_sw_image_gi }}"
914
loop_control:
10-
label: "{{ oracle_gi_image | default ('') }}"
15+
label: "{{ oracle_gi_image | default('') }}"
1116
args:
1217
creates: "{{ oracle_home_gi }}/root.sh"
1318
become: true
@@ -16,11 +21,6 @@
1621
when:
1722
- oracle_install_version_gi == item.version
1823

19-
tags:
20-
- oragridswunpack
21-
when:
22-
- oracle_home_gi not in checkgiinstall.stdout
23-
2424
# Check for an existing GRID_HOME before reinstallation of OPatch
2525
- name: install_home_gi | Check for file GridSetup.sh
2626
no_log: true
@@ -42,7 +42,12 @@
4242
when: configure_cluster
4343
tags: cvuqdisk
4444

45-
- block: # noqa unnamed-task when: configure_cluster
45+
- name: When configure_cluster
46+
when:
47+
- configure_cluster
48+
- hostvars[cluster_master]['statcvuqdisk']['stat']['exists']
49+
tags: cvuqdisk
50+
block:
4651

4752
# synchronize didn't work on all environments...
4853
# => fetch to ansible controller
@@ -59,7 +64,7 @@
5964

6065
- name: install_home_gi | copy cvuqdisk to cluster nodes
6166
ansible.builtin.copy:
62-
src: "/tmp/{{ cluster_master }}/{{ oracle_home_gi }}/cv/rpm/{{ cvuqdisk_rpm }}"
67+
src: "/tmp/{{ cluster_master }}/{{ oracle_home_gi }}/cv/rpm/{{ cvuqdisk_rpm }}"
6368
dest: "{{ oracle_rsp_stage }}/{{ cvuqdisk_rpm }}"
6469
mode: 0644
6570
tags: cvuqdisk
@@ -71,11 +76,6 @@
7176
disable_gpg_check: true
7277
tags: cvuqdisk
7378

74-
when:
75-
- configure_cluster
76-
- hostvars[cluster_master]['statcvuqdisk']['stat']['exists']
77-
tags: cvuqdisk
78-
7979
- name: install_home_gi | Setup response file for install (GI)
8080
ansible.builtin.template:
8181
src=grid-install.rsp.{{ oracle_install_version_gi }}.j2
@@ -93,7 +93,9 @@
9393
when:
9494
- item.diskgroup == oracle_asm_init_dg
9595

96-
- block: # when: oracle_home_gi not in checkgiinstall.stdout
96+
- name: ""
97+
when: oracle_home_gi not in checkgiinstall.stdout
98+
block: # when: oracle_home_gi not in checkgiinstall.stdout
9799

98100
- include_tasks: runcluvfy.yml
99101
when:
@@ -119,20 +121,21 @@
119121
tags:
120122
- oragridinstall
121123
register: giinstall
122-
failed_when: giinstall.rc not in [0,6]
124+
failed_when: giinstall.rc = not in [0, 6]
123125

124126
- ansible.builtin.debug: var=giinstall.stdout_lines # noqa unnamed-task
125127
run_once: "{{ configure_cluster }}"
126128
when: giinstall.stdout_lines is defined
127129

128-
when: oracle_home_gi not in checkgiinstall.stdout
129-
130130
- name: install_home_gi | include role oraswgi_manage_patches
131131
ansible.builtin.include_role:
132132
name: oraswgi_manage_patches
133133
when: patch_before_rootsh and apply_patches_gi
134134

135-
- block: # when: oracle_home_gi not in checkgiinstall.stdout
135+
- name: ""
136+
when:
137+
- oracle_home_gi not in checkgiinstall.stdout
138+
block: # when: oracle_home_gi not in checkgiinstall.stdout
136139
- name: install_home_gi | Run oraInstroot script after installation
137140
ansible.builtin.command: "{{ oracle_inventory_loc }}/orainstRoot.sh"
138141
# noqa no-changed-when
@@ -191,6 +194,3 @@
191194
- run_configtoolallcommand
192195
ignore_errors: true
193196
register: configtool
194-
195-
when:
196-
- oracle_home_gi not in checkgiinstall.stdout

roles/oraswgi_install/tasks/21.3.0.0.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
---
2-
- block:
2+
- name: install_home_gi
3+
tags:
4+
- oragridswunpack
5+
when:
6+
- oracle_home_gi not in checkgiinstall.stdout
7+
block:
38
- ansible.builtin.debug: msg="install_home_gi | Start Extract files to ORACLE_HOME (gi)" # noqa unnamed-task
49
run_once: "{{ configure_cluster }}"
510

611
- name: install_home_gi | Extract files to ORACLE_HOME (gi)
712
ansible.builtin.unarchive: src={{ oracle_gi_image }} dest={{ oracle_home_gi }} copy=no
813
with_items: "{{ oracle_sw_image_gi }}"
914
loop_control:
10-
label: "{{ oracle_gi_image | default ('') }}"
15+
label: "{{ oracle_gi_image | default('') }}"
1116
args:
1217
creates: "{{ oracle_home_gi }}/root.sh"
1318
become: true
@@ -16,11 +21,6 @@
1621
when:
1722
- oracle_install_version_gi == item.version
1823

19-
tags:
20-
- oragridswunpack
21-
when:
22-
- oracle_home_gi not in checkgiinstall.stdout
23-
2424
# Check for an existing GRID_HOME before reinstallation of OPatch
2525
- name: install_home_gi | Check for file GridSetup.sh
2626
no_log: true
@@ -42,7 +42,12 @@
4242
when: configure_cluster
4343
tags: cvuqdisk
4444

45-
- block: # noqa unnamed-task when: configure_cluster
45+
- name: install_home_gi
46+
when:
47+
- configure_cluster
48+
- hostvars[cluster_master]['statcvuqdisk']['stat']['exists']
49+
tags: cvuqdisk
50+
block:
4651

4752
# synchronize didn't work on all environments...
4853
# => fetch to ansible controller
@@ -59,7 +64,7 @@
5964

6065
- name: install_home_gi | copy cvuqdisk to cluster nodes
6166
ansible.builtin.copy:
62-
src: "/tmp/{{ cluster_master }}/{{ oracle_home_gi }}/cv/rpm/{{ cvuqdisk_rpm }}"
67+
src: "/tmp/{{ cluster_master }}/{{ oracle_home_gi }}/cv/rpm/{{ cvuqdisk_rpm }}"
6368
dest: "{{ oracle_rsp_stage }}/{{ cvuqdisk_rpm }}"
6469
mode: 0644
6570
tags: cvuqdisk
@@ -71,11 +76,6 @@
7176
disable_gpg_check: true
7277
tags: cvuqdisk
7378

74-
when:
75-
- configure_cluster
76-
- hostvars[cluster_master]['statcvuqdisk']['stat']['exists']
77-
tags: cvuqdisk
78-
7979
- name: install_home_gi | Setup response file for install (GI)
8080
ansible.builtin.template:
8181
src=grid-install.rsp.{{ oracle_install_version_gi }}.j2
@@ -93,7 +93,9 @@
9393
when:
9494
- item.diskgroup == oracle_asm_init_dg
9595

96-
- block: # when: oracle_home_gi not in checkgiinstall.stdout
96+
- name: ""
97+
when: oracle_home_gi not in checkgiinstall.stdout
98+
block: # when: oracle_home_gi not in checkgiinstall.stdout
9799

98100
- include_tasks: runcluvfy.yml
99101
when:
@@ -119,20 +121,21 @@
119121
tags:
120122
- oragridinstall
121123
register: giinstall
122-
failed_when: giinstall.rc not in [0,6]
124+
failed_when: giinstall.rc not in [0, 6]
123125

124126
- ansible.builtin.debug: var=giinstall.stdout_lines # noqa unnamed-task
125127
run_once: "{{ configure_cluster }}"
126128
when: giinstall.stdout_lines is defined
127129

128-
when: oracle_home_gi not in checkgiinstall.stdout
129-
130130
- name: install_home_gi | include role oraswgi_manage_patches
131131
ansible.builtin.include_role:
132132
name: oraswgi_manage_patches
133133
when: patch_before_rootsh and apply_patches_gi
134134

135-
- block: # when: oracle_home_gi not in checkgiinstall.stdout
135+
- name: ""
136+
when:
137+
- oracle_home_gi not in checkgiinstall.stdout
138+
block: # when: oracle_home_gi not in checkgiinstall.stdout
136139
- name: install_home_gi | Run oraInstroot script after installation
137140
ansible.builtin.command: "{{ oracle_inventory_loc }}/orainstRoot.sh"
138141
# noqa no-changed-when
@@ -191,6 +194,3 @@
191194
- run_configtoolallcommand
192195
ignore_errors: true
193196
register: configtool
194-
195-
when:
196-
- oracle_home_gi not in checkgiinstall.stdout

roles/oraswgi_install/tasks/curl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99
creates: "{{ oracle_stage }}/{{ item.filename }}"
1010
tags:
1111
- oragridsw
12-
when: oracle_home_gi not in checkgiinstall.stdout and not is_sw_source_local and oracle_install_version_gi == item.version and oracle_sw_copy
12+
when: oracle_home_gi not in checkgiinstall.stdout and not is_sw_source_local and oracle_install_version_gi == item.version and oracle_sw_copy

roles/oraswgi_install/tasks/get_url.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
become_user: "{{ grid_install_user }}"
1111
tags:
1212
- oragridsw
13-
when: oracle_home_gi not in checkgiinstall.stdout and oracle_install_version_gi == item.version and not is_sw_source_local and oracle_sw_copy
13+
when: oracle_home_gi not in checkgiinstall.stdout and oracle_install_version_gi == item.version and not is_sw_source_local and oracle_sw_copy

0 commit comments

Comments
 (0)