diff --git a/tasks/sapnote/2002167/06-additional-notes-for-installing-sap-systems.yml b/tasks/sapnote/2002167/06-additional-notes-for-installing-sap-systems.yml index c3e9113..05bd8e3 100644 --- a/tasks/sapnote/2002167/06-additional-notes-for-installing-sap-systems.yml +++ b/tasks/sapnote/2002167/06-additional-notes-for-installing-sap-systems.yml @@ -17,7 +17,16 @@ dest: /usr/lib64/liblber.so.199 state: link -- name: Copy file /etc/tmpfiles.d/sap.conf +- name: Test if file /usr/lib/tmpfiles.d/sap.conf exists + stat: + path: /usr/lib/tmpfiles.d/sap.conf + register: systemd_sap_conf + failed_when: no + +- debug: + var: systemd_sap_conf.stat.exists + +- name: Copy file /etc/tmpfiles.d/sap.conf if necessary copy: src: etc/tmpfiles.d/sap.conf dest: /etc/tmpfiles.d/sap.conf @@ -25,5 +34,6 @@ group: root mode: '0644' backup: yes + when: not systemd_sap_conf.stat.exists ... diff --git a/tasks/sapnote/2772999/04-configure-network-time-and-date.yml b/tasks/sapnote/2772999/04-configure-network-time-and-date.yml index 937822f..e8790c4 100644 --- a/tasks/sapnote/2772999/04-configure-network-time-and-date.yml +++ b/tasks/sapnote/2772999/04-configure-network-time-and-date.yml @@ -11,12 +11,4 @@ state: started enabled: yes -- name: Get status of chronyd - command: bash -lc "systemctl status chronyd" - register: command_result - ignore_errors: True - changed_when: False -- debug: - var: command_result.stdout_lines, command_result.stderr_lines - ... diff --git a/tasks/sapnote/2772999/10-configure-systemd-tmpfiles.yml b/tasks/sapnote/2772999/10-configure-systemd-tmpfiles.yml index 18e6371..161c7ae 100644 --- a/tasks/sapnote/2772999/10-configure-systemd-tmpfiles.yml +++ b/tasks/sapnote/2772999/10-configure-systemd-tmpfiles.yml @@ -5,7 +5,16 @@ - debug: msg: "SAP note 2772999 Step 10: Configure systemd-tmpfiles" -- name: Copy file /etc/tmpfiles.d/sap.conf +- name: Test if file /usr/lib/tmpfiles.d/sap.conf exists + stat: + path: /usr/lib/tmpfiles.d/sap.conf + register: systemd_sap_conf + failed_when: no + +- debug: + var: systemd_sap_conf.stat.exists + +- name: Copy file /etc/tmpfiles.d/sap.conf if necessary copy: src: etc/tmpfiles.d/sap.conf dest: /etc/tmpfiles.d/sap.conf @@ -13,5 +22,6 @@ group: root mode: '0644' backup: yes + when: not systemd_sap_conf.stat.exists ...