diff options
Diffstat (limited to 'playbooks/ssh.yaml')
| -rw-r--r-- | playbooks/ssh.yaml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/playbooks/ssh.yaml b/playbooks/ssh.yaml new file mode 100644 index 0000000..167a235 --- /dev/null +++ b/playbooks/ssh.yaml @@ -0,0 +1,11 @@ +--- +- name: "Configure ssh" + shell: | + if [ "$(grep -F 'UseDNS' /etc/ssh/sshd_config)" == "" ]; then + echo "UseDNS no" | tee -a /etc/ssh/sshd_config + else + sed -e 's/^UseDNS.*$/UseDNS no/g' -i /etc/ssh/sshd_config + fi + sed -e 's/^SSHD_OPTS.*$/SSHD_OPTS="-u0"/g' -i /etc/default/ssh + args: + executable: /bin/bash |
