This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
Thrace-lan.info
/
ansible
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
working on changes, and debugging
master
Erin Sims
2 years ago
parent
99e4915e12
commit
168a0ba85d
1 changed files
with
8 additions
and
22 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+8
-22
playbooks/sshfs.yaml
+ 8
- 22
playbooks/sshfs.yaml
View File
@@ -54,27 +54,13 @@
loop: "{{ share }}"
notify:
- SSHFS
- name: setup mount sshfs
template:
src: ./sshfs.mount.j2
dest: "/usr/lib/systemd/system/sshfs-{{ item }}.mount"
mode: 0644
owner: root
group: root
loop: "{{ share }}"
notify:
- SSHFS
- name: "sshfs {{ item }} service start"
systemd:
name: "sshfs-{{ item }}"
state: started
enabled: yes
masked: no
daemon_reload: yes
loop: "{{ share }}"
- name: Ensure fstab has sshfs
ansible.builtin.lineinfile:
path: /etc/fstab
regexp: '^sshfs'
line: '{{ [username,'@',hostname,':',remotepath,item,'/',' ',localpath,item,'/' ]|join() }} fuse.sshfs noauto,x-systemd.automount,_netdev,users,idmap=user,IdentityFile=/home/sshfs/.ssh/sshfs-key,allow_other,reconnect 0 0'
handlers:
- name: SSHFS
ansible.builtin.service:
name: sshfs {{ item }} service restart"
state: restarted
loop: "{{ share }}"
ansible.builtin.command: "mount {{ [ localpath,item,'/' ]|join() }}"
Write
Preview
Loading…
Cancel
Save