本網站在啟用 JavaScript 的情況下可以運作的更好。
首頁
探索
說明
登入
10sr
/
dotfiles-mirror
镜像来自
https://github.com/10sr/dotfiles.git
關注
1
收藏
0
複製
0
程式碼
問題
0
版本發佈
0
Wiki
活動
瀏覽代碼
use set_fact for finding sshd_config
pull/1/head
10sr
10 年之前
父節點
ecca55a1d5
當前提交
c5e2407086
共有
1 個檔案被更改
,包括
9 行新增
和
2 行删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+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"
Write
Preview
Loading…
取消
儲存