From 806bbab3b73f240612796e0f51a6f8b54eeae0d9 Mon Sep 17 00:00:00 2001 From: pgrondek Date: Fri, 10 Apr 2020 21:23:29 +0200 Subject: [PATCH] rpc-statd configuration --- rpc/rpc-statd.service | 20 ++++++++++++++++++++ rpc/update-rpc.yml | 24 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 rpc/rpc-statd.service create mode 100644 rpc/update-rpc.yml diff --git a/rpc/rpc-statd.service b/rpc/rpc-statd.service new file mode 100644 index 0000000..dab6402 --- /dev/null +++ b/rpc/rpc-statd.service @@ -0,0 +1,20 @@ +[Unit] +Description=NFS status monitor for NFSv2/3 locking. +DefaultDependencies=no +Conflicts=umount.target +Requires=nss-lookup.target rpcbind.socket +After=network.target nss-lookup.target rpcbind.socket + +PartOf=nfs-utils.service + +Wants=nfs-config.service rpc-statd-notify.service +After=nfs-config.service + +[Service] +EnvironmentFile=-/run/sysconfig/nfs-utils +Type=forking +PIDFile=/var/run/rpc.statd.pid +ExecStart=/sbin/rpc.statd --no-notify $STATDARGS + +[Install] +WantedBy=default.target diff --git a/rpc/update-rpc.yml b/rpc/update-rpc.yml new file mode 100644 index 0000000..677cc51 --- /dev/null +++ b/rpc/update-rpc.yml @@ -0,0 +1,24 @@ +--- +- name: update rpc-statd + hosts: docker_swarm + become_method: sudo + become_user: root + become: yes + + tasks: + - name: update rpc config + copy: + src: rpc-statd.service + dest: /lib/systemd/system/rpc-statd.service + + - name: stop and disable rpc + systemd: + name: rpc-statd + state: stopped + enabled: false + + - name: start and enable rpc + systemd: + name: rpc-statd + state: started + enabled: true \ No newline at end of file