From 9950c123f4a8e2c05b05c07a2e9ba3715933da2c Mon Sep 17 00:00:00 2001 From: chsteinle Date: Tue, 11 Jan 2022 16:04:01 +0100 Subject: [PATCH] Wait until nas is responding and check mount. --- nas.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/nas.yaml b/nas.yaml index 45a0c22..f73241d 100644 --- a/nas.yaml +++ b/nas.yaml @@ -11,3 +11,21 @@ - name: Wakeup the nas community.general.wakeonlan: mac: '54:04:a6:f1:9b:80' + + - name: Wait nas is responding + wait_for: + timeout: 90 + delegate_to: localhost + + - name: Check mount point exists + file: + path: /media/nas + state: directory + + - name: Mount nas volume + ansible.posix.mount: + src: //192.168.178.50/data + path: /media/nas + state: mounted + fstype: cifs + opts: username=Chris,password=396BZ%LYHvNwuJfw