This website works better with JavaScript.
首頁
探索
說明
註冊
登入
Thrace-lan.info
/
ansible
關註
1
收藏
0
複製
0
程式碼
問題管理
0
合併請求
0
版本發佈
0
Wiki
Activity
瀏覽代碼
working on changes, and debugging
master
Erin Sims
2 年之前
父節點
99e4915e12
當前提交
168a0ba85d
共有
1 個文件被更改
,包括
8 次插入
和
22 次删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+8
-22
playbooks/sshfs.yaml
+ 8
- 22
playbooks/sshfs.yaml
查看文件
@@ -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…
取消
儲存