Skip to content

Commit

Permalink
sap_netweaver_preconfigure: Surround absolute file names with single …
Browse files Browse the repository at this point in the history
…quotes
  • Loading branch information
berndfinger committed Jan 25, 2023
1 parent 4fd5eca commit 9690c4b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions roles/sap_netweaver_preconfigure/tasks/sapnote/3119751.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
path: /opt/rh/SAP/lib64/compat-sap-c++-10.so
register: __sap_netweaver_preconfigure_register_stat_compat_sap_cpp

- name: Create directory "{{ sap_netweaver_preconfigure_rpath }}"
- name: Create directory '{{ sap_netweaver_preconfigure_rpath }}'
ansible.builtin.file:
path: "{{ sap_netweaver_preconfigure_rpath }}"
state: directory
Expand All @@ -19,7 +19,7 @@
mode: '0755'
when: __sap_netweaver_preconfigure_register_stat_compat_sap_cpp.stat.exists

- name: Create a link to libstdc++.so.6
- name: Create a link to '{{ sap_netweaver_preconfigure_rpath }}libstdc++.so.6'
ansible.builtin.file:
src: /opt/rh/SAP/lib64/compat-sap-c++-10.so
dest: "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6"
Expand Down
22 changes: 11 additions & 11 deletions roles/sap_netweaver_preconfigure/tasks/sapnote/assert-3119751.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,38 @@

- name: Report if checking for a link from libstdc++.so.6 to compat-sap-c++-10.so is skipped
ansible.builtin.debug:
msg: "INFO: Not checking for link {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 - file /opt/rh/SAP/lib64/compat-sap-c++-10.so does not exist on this system."
msg: "INFO: Not checking for link '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' - file '/opt/rh/SAP/lib64/compat-sap-c++-10.so' does not exist on this system."
when: not __sap_netweaver_preconfigure_register_stat_compat_sap_cpp.stat.exists

- name: Get info about file "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6"
- name: Get info about file '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6'
ansible.builtin.stat:
path: "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6"
register: __sap_netweaver_preconfigure_register_stat_libstdc_assert
when: __sap_netweaver_preconfigure_register_stat_compat_sap_cpp.stat.exists

- name: Assert that file "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6" exists
- name: Assert that file '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' exists
ansible.builtin.assert:
that: __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.exists
fail_msg: "FAIL: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 does not exist!"
success_msg: "PASS: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 exists."
fail_msg: "FAIL: File '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' does not exist!"
success_msg: "PASS: File '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' exists."
ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}"
when: __sap_netweaver_preconfigure_register_stat_compat_sap_cpp.stat.exists

- name: Assert that file "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6" is a link
- name: Assert that file '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' is a link
ansible.builtin.assert:
that: __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.islnk
fail_msg: "FAIL: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 is not a link!"
success_msg: "PASS: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 is a link."
fail_msg: "FAIL: File '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' is not a link!"
success_msg: "PASS: File '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' is a link."
ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}"
when:
- __sap_netweaver_preconfigure_register_stat_compat_sap_cpp.stat.exists
- __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.exists

- name: Assert that file "{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6" is a link to /opt/rh/SAP/lib64/compat-sap-c++-10.so
- name: Assert that file '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' is a link to '/opt/rh/SAP/lib64/compat-sap-c++-10.so'
ansible.builtin.assert:
that: __sap_netweaver_preconfigure_register_stat_libstdc_assert.stat.lnk_target == '/opt/rh/SAP/lib64/compat-sap-c++-10.so'
fail_msg: "FAIL: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 is not a link to /opt/rh/SAP/lib64/compat-sap-c++-10.so!"
success_msg: "PASS: File {{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6 is a link to /opt/rh/SAP/lib64/compat-sap-c++-10.so."
fail_msg: "FAIL: File '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' is not a link to '/opt/rh/SAP/lib64/compat-sap-c++-10.so!'"
success_msg: "PASS: File '{{ sap_netweaver_preconfigure_rpath }}/libstdc++.so.6' is a link to '/opt/rh/SAP/lib64/compat-sap-c++-10.so.'"
ignore_errors: "{{ sap_netweaver_preconfigure_assert_ignore_errors | d(false) }}"
when:
- __sap_netweaver_preconfigure_register_stat_compat_sap_cpp.stat.exists
Expand Down

0 comments on commit 9690c4b

Please sign in to comment.