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