使用 JavaScript能使本网站更好的工作。
首页
探索
帮助
登录
10sr
/
dotfiles-mirror
镜像自地址
https://github.com/10sr/dotfiles.git
关注
1
点赞
0
派生
0
代码
工单
0
版本发布
0
百科
动态
浏览代码
use set_fact for finding sshd_config
pull/1/head
10sr
10 年前
父节点
ecca55a1d5
当前提交
c5e2407086
共有
1 个文件被更改
,包括
9 次插入
和
2 次删除
分列视图
Diff 选项
显示统计
下载 Patch 文件
下载 Diff 文件
+9
-2
ansible/sshd_config.yml
+ 9
- 2
ansible/sshd_config.yml
查看文件
@@ -1,9 +1,16 @@
---
- hosts: all
vars:
conf: /etc/ssh/sshd_config
#
vars:
#
conf: /etc/ssh/sshd_config
sudo: yes
tasks:
- name: find sshd_config
set_fact: conf={{item}}
with_first_found:
- /etc/ssh/sshd_config
- /etc/sshd_config
- name: assert sshd_config found
assert: conf is defined
- name: Protocol 2
lineinfile: dest={{conf}}
regexp="^(#)?Protocol"
撰写
预览
正在加载...
取消
保存