From 32086f62131e1b813e2f3d97bc2c78f66c6a3154 Mon Sep 17 00:00:00 2001 From: Carlos Konstanski Date: Wed, 13 Dec 2017 18:54:21 -0700 Subject: adding files --- playbooks/ssh.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 playbooks/ssh.yaml (limited to 'playbooks/ssh.yaml') 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 -- cgit v1.3