Skip to content

Commit 2c01d26

Browse files
authored
Merge pull request #1121 from marcelmamula/linting_hostagent
sap_hostagent: Fix linting errors
2 parents 11a7af2 + 7c683f1 commit 2c01d26

File tree

5 files changed

+24
-22
lines changed

5 files changed

+24
-22
lines changed

roles/sap_hostagent/tasks/config_ssl.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
environment:
4040
LD_LIBRARY_PATH: /usr/sap/hostctrl/exe
4141
SECUDIR: /usr/sap/hostctrl/exe/sec
42-
register: ssl_config_output
43-
changed_when: "'Certificate Request:' in ssl_config_output.stdout"
42+
register: __sap_hostagent_register_sapgenpse_gen_pse
43+
changed_when: "'Certificate Request:' in __sap_hostagent_register_sapgenpse_gen_pse.stdout"
4444

4545
- name: Grant SAP Host Agent access to the server PSE
4646
ansible.builtin.command: >
@@ -55,8 +55,8 @@
5555
environment:
5656
LD_LIBRARY_PATH: /usr/sap/hostctrl/exe
5757
SECUDIR: /usr/sap/hostctrl/exe/sec
58-
register: ssl_config_output
59-
changed_when: "'Added SSO-credentials for PSE' in ssl_config_output.stdout"
58+
register: __sap_hostagent_register_sapgenpse_seclogin
59+
changed_when: "'Added SSO-credentials for PSE' in __sap_hostagent_register_sapgenpse_seclogin.stdout"
6060

6161
# Right now there is no option to import the signed certificate. The CSR must be signed
6262
# by a valid CA in order to import it
@@ -86,10 +86,10 @@
8686
environment:
8787
LD_LIBRARY_PATH: /usr/sap/hostctrl/exe
8888
SECUDIR: /usr/sap/hostctrl/exe/sec
89-
register: ssl_config_output
90-
changed_when: "'Opening PSE' in ssl_config_output.stdout"
89+
register: __sap_hostagent_register_sapgenpse_get_my_name
90+
changed_when: "'Opening PSE' in __sap_hostagent_register_sapgenpse_get_my_name.stdout"
9191

9292
- name: Restart SAPHOSTAGENT
9393
ansible.builtin.command: /usr/sap/hostctrl/exe/saphostexec -restart
94-
register: ssl_config_output
95-
changed_when: "'start hostcontrol using profile' in ssl_config_output.stdout"
94+
register: __sap_hostagent_register_saphostexec_restart
95+
changed_when: "'start hostcontrol using profile' in __sap_hostagent_register_saphostexec_restart.stdout"

roles/sap_hostagent/tasks/deploy_bundle.yml

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

1111
- name: Install SAPHOSTAGENT
1212
ansible.builtin.command: "{{ sap_hostagent_agent_tmp_directory }}/global/hdb/saphostagent_setup/saphostexec -install"
13-
register: installagent
13+
register: __sap_hostagent_register_install_saphostagent_bundle
1414
args:
1515
chdir: "{{ sap_hostagent_agent_tmp_directory }}/global/hdb/saphostagent_setup/"
16-
changed_when: "'Install service' in installagent.stdout"
16+
changed_when: "'Install service' in __sap_hostagent_register_install_saphostagent_bundle.stdout"

roles/sap_hostagent/tasks/deploy_rpm.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@
88
mode: '0755'
99
when: sap_hostagent_rpm_local_path is defined
1010

11+
# disable_gpg_check is not package parameter,
12+
# but it is recognized by underlying package manager
1113
- name: Ensure RPM file is installed
12-
ansible.builtin.yum:
14+
ansible.builtin.package:
1315
name: "{{ sap_hostagent_agent_tmp_directory }}/{{ sap_hostagent_rpm_file_name }}"
1416
state: present
15-
disable_gpg_check: yes
17+
disable_gpg_check: true
1618
when: sap_hostagent_rpm_local_path is defined
1719

1820
- name: Ensure RPM file is installed
19-
ansible.builtin.yum:
21+
ansible.builtin.package:
2022
name: "{{ sap_hostagent_rpm_remote_path }}/{{ sap_hostagent_rpm_file_name }}"
2123
state: present
22-
disable_gpg_check: yes
24+
disable_gpg_check: true
2325
when: sap_hostagent_rpm_remote_path is defined

roles/sap_hostagent/tasks/deploy_sar.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
ansible.builtin.command: >-
1818
{{ sap_hostagent_agent_tmp_directory }}/{{ sap_hostagent_sapcar_file_name }} \
1919
-xvf {{ sap_hostagent_agent_tmp_directory }}/{{ sap_hostagent_sar_file_name }} -manifest SIGNATURE.SMF
20-
register: extractagent
20+
register: __sap_hostagent_register_extract_saphostagent_sar
2121
args:
2222
chdir: "{{ sap_hostagent_agent_tmp_directory }}"
23-
changed_when: "'SAPCAR: processing archive' in extractagent.stdout"
23+
changed_when: "'SAPCAR: processing archive' in __sap_hostagent_register_extract_saphostagent_sar.stdout"
2424

2525
- name: Install SAPHOSTAGENT
2626
ansible.builtin.command: "{{ sap_hostagent_agent_tmp_directory }}/saphostexec -install"
27-
register: installagent
27+
register: __sap_hostagent_register_install_saphostagent_sar
2828
args:
2929
chdir: "{{ sap_hostagent_agent_tmp_directory }}"
30-
changed_when: "'Install service' in installagent.stdout"
30+
changed_when: "'Install service' in __sap_hostagent_register_install_saphostagent_sar.stdout"

roles/sap_hostagent/tasks/deploy_sar_remote.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
ansible.builtin.command: >-
66
{{ sap_hostagent_sapcar_remote_path }}/{{ sap_hostagent_sapcar_file_name }} \
77
-xvf {{ sap_hostagent_sar_remote_path }}/{{ sap_hostagent_sar_file_name }} -manifest SIGNATURE.SMF
8-
register: extractagent
8+
register: __sap_hostagent_register_extract_saphostagent_sar_remote
99
args:
1010
chdir: "{{ sap_hostagent_agent_tmp_directory }}"
11-
changed_when: "'SAPCAR: processing archive' in extractagent.stdout"
11+
changed_when: "'SAPCAR: processing archive' in __sap_hostagent_register_extract_saphostagent_sar_remote.stdout"
1212

1313
- name: Install SAPHOSTAGENT
1414
ansible.builtin.command: "{{ sap_hostagent_agent_tmp_directory }}/saphostexec -install"
15-
register: installagent
15+
register: __sap_hostagent_register_install_saphostagent_sar_remote
1616
args:
1717
chdir: "{{ sap_hostagent_agent_tmp_directory }}"
18-
changed_when: "'Install service' in installagent.stdout"
18+
changed_when: "'Install service' in __sap_hostagent_register_install_saphostagent_sar_remote.stdout"

0 commit comments

Comments
 (0)