This website works better with JavaScript.
Home
Explore
Help
Sign In
10sr
/
dotfiles-mirror
mirror of
https://github.com/10sr/dotfiles.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
0
Wiki
Activity
Browse Source
use set_fact for finding sshd_config
pull/1/head
10sr
10 years ago
parent
ecca55a1d5
commit
c5e2407086
1 changed files
with
9 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+9
-2
ansible/sshd_config.yml
+ 9
- 2
ansible/sshd_config.yml
View File
@@ -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…
Cancel
Save