使用 JavaScript能使本网站更好的工作。
首页
探索
帮助
注册
登录
Thrace-lan.info
/
ansible
关注
1
点赞
0
派生
0
代码
工单
0
合并请求
0
版本发布
0
百科
动态
浏览代码
working on changes, and debugging
master
Erin Sims
2 年前
父节点
99e4915e12
当前提交
168a0ba85d
共有
1 个文件被更改
,包括
8 次插入
和
22 次删除
分列视图
Diff 选项
显示统计
下载 Patch 文件
下载 Diff 文件
+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() }}"
撰写
预览
正在加载...
取消
保存