diff --git a/playbooks/ssh-config b/playbooks/ssh-config new file mode 100644 index 0000000..bbaef0f --- /dev/null +++ b/playbooks/ssh-config @@ -0,0 +1,6 @@ +host home.thrace-lan.info + user sshfs + hostname home.thrace-lan.info + port 22000 + identityfile ~/.ssh/sshfs-key + diff --git a/playbooks/sshfs.yaml b/playbooks/sshfs.yaml index f483567..c0bc7b6 100644 --- a/playbooks/sshfs.yaml +++ b/playbooks/sshfs.yaml @@ -19,6 +19,13 @@ name: sshfs state: present group: sshfs + - name: make ssh home directory + file: + path: "/home/sshfs/.ssh/" + state: directory + owner: sshfs + group: sshfs + mode: '0700' - name: copy private key copy: src: "./sshfs-key" @@ -26,6 +33,13 @@ owner: sshfs group: sshfs mode: '0700' + - name: copy ssh config + copy: + src: "./ssh-config" + dest: "/home/sshfs/.ssh/config" + owner: sshfs + group: sshfs + mode: '0700' - name: "sshfs mount {{ item }}" file: path: "{{ localpath}}{{ item }}/"