From 8935dd97e0d2e9477256727712053c4db2a60947 Mon Sep 17 00:00:00 2001 From: Erin Sims Date: Fri, 30 Sep 2022 06:41:34 -0400 Subject: [PATCH] working on sshfs still trying to get it all to creatuo automatically --- playbooks/ssh-config | 6 ++++++ playbooks/sshfs.yaml | 14 ++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 playbooks/ssh-config 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 }}/"