|
@@ -1,16 +1,17 @@ |
|
|
--- |
|
|
--- |
|
|
- hosts: all |
|
|
- hosts: all |
|
|
# vars: |
|
|
|
|
|
# conf: /etc/ssh/sshd_config |
|
|
|
|
|
|
|
|
vars: |
|
|
|
|
|
conf: /etc/ssh/sshd_config |
|
|
sudo: yes |
|
|
sudo: yes |
|
|
tasks: |
|
|
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: find sshd_config |
|
|
|
|
|
# set_fact: conf={{item}} |
|
|
|
|
|
# # how to check remote files? |
|
|
|
|
|
# with_first_found: |
|
|
|
|
|
# - /etc/ssh/sshd_config |
|
|
|
|
|
# - /etc/sshd_config |
|
|
|
|
|
# - name: assert sshd_config found |
|
|
|
|
|
# assert: that="conf is defined" |
|
|
- name: Protocol 2 |
|
|
- name: Protocol 2 |
|
|
lineinfile: dest={{conf}} |
|
|
lineinfile: dest={{conf}} |
|
|
regexp="^(#)?Protocol" |
|
|
regexp="^(#)?Protocol" |
|
|