From 9c1be2b1bfb92af05a1b6e724608a55eec772425 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Tue, 13 Dec 2022 12:08:08 -0800 Subject: config: fix samba mount --- jinwei.me/config/roles/debian_init/tasks/main.yaml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/jinwei.me/config/roles/debian_init/tasks/main.yaml b/jinwei.me/config/roles/debian_init/tasks/main.yaml index ff13181..002da90 100644 --- a/jinwei.me/config/roles/debian_init/tasks/main.yaml +++ b/jinwei.me/config/roles/debian_init/tasks/main.yaml @@ -19,6 +19,7 @@ - python3-pip - unzip - gnupg + - rsync - htop - curl - tree @@ -76,23 +77,17 @@ become: true become_user: admin -- name: Create fstab entry for samba - mount: - state: present - fstype: cifs - opts: "credentials={{ user_home }}/.credential,file_mode=0755,dir_mode=0755,user" - src: "//{{ lookup('aws_ssm', '/jinwei-me/hetzner/storagebox') }}" - path: "{{ samba_mount_point }}" - become: true - - name: Create directory file: path: "{{ samba_mount_point }}" state: directory mode: '0755' -- name: Do the actual mount - shell: | - mount "{{ samba_mount_point }}" +- name: Create fstab entry for samba + mount: + state: mounted + fstype: cifs + opts: "credentials={{ user_home }}/.credential,file_mode=0755,dir_mode=0755,user" + src: "//{{ lookup('aws_ssm', '/jinwei-me/hetzner/storagebox') }}" + path: "{{ samba_mount_point }}" become: true - become_user: admin -- cgit v1.2.3