diff --git a/tasks/rosetta/configure_nfs_monitoring.yml b/tasks/rosetta/configure_nfs_monitoring.yml index 2a20ef86e4cd8e38a2cc44a70b511e7fbebd4672..76c5ef2b6da7e0c0014ef1c9c5d5f87bfa9acfc7 100644 --- a/tasks/rosetta/configure_nfs_monitoring.yml +++ b/tasks/rosetta/configure_nfs_monitoring.yml @@ -8,22 +8,34 @@ group: "root" - name: install NFS monitoring services - ansible.builtin.template: - src: "usr/local/lib/systemd/system/{{ item }}.j2" - dest: "/usr/local/lib/systemd/system/{{ item }}" - mode: "0600" - owner: "root" - group: "root" - loop: - - "nfs_timeout_notification.service" - - "nfs_timeout_notification.service.sh" - notify: daemon-reload + block: + + - name: install NFS monitoring services (1/3) - copy service script + ansible.builtin.template: + src: "usr/local/bin/{{ item }}.j2" + dest: "/usr/local/bin/{{ item }}" + mode: "0600" + owner: "root" + group: "root" + loop: + - "nfs_timeout_notification.service.sh" + + - name: install NFS monitoring services (2/3) - copy service unit + ansible.builtin.template: + src: "usr/local/lib/systemd/system/{{ item }}.j2" + dest: "/usr/local/lib/systemd/system/{{ item }}" + mode: "0600" + owner: "root" + group: "root" + loop: + - "nfs_timeout_notification.service" + notify: daemon-reload -- name: enable NFS monitoring services - ansible.builtin.systemd_service: - name: "{{ item.name }}" - enabled: "{{ item.enabled | default(true) }}" - state: "{{ item.state | default('started') }}" - daemon_reload: true - loop: - - name: "nfs_timeout_notification.service" + - name: install NFS monitoring services (3/3) - enable service + ansible.builtin.systemd_service: + name: "{{ item.name }}" + enabled: "{{ item.enabled | default(true) }}" + state: "{{ item.state | default('started') }}" + daemon_reload: true + loop: + - name: "nfs_timeout_notification.service"