Add element for openssh and override UseDNS

We need to disable UseDNS in default sshd_config, which is something we
already do when deploying SSHD service in puppet/services/sshd.yaml but
the parameter is still enabled before Puppet has run, which causes
problems when Ansible has to execute remote tasks via ssh, it timeouts.

This patch adds an element that will allow us to override the default
openssh configuration and it'll disable UseDNS.

Change-Id: I2df6c45936ee88e0eb048998ae23c9334f295fdf
Related-Bug: #1774557
Emilien Macchi 2018-06-01 09:14:48 -07:00
parent cb18bc8249
commit 939b5861e1
3 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,5 @@
Override the default openssh configuration.

View File

@ -0,0 +1,7 @@
set -eu
set -o pipefail
sed -i 's/#UseDNS yes/UseDNS no/' /etc/ssh/sshd_config

View File

@ -0,0 +1,6 @@
- |
An element can now override the default openssh configuration.
For now, we set UseDNS to 'no' to avoid timeouts when Ansible tries
to run remote tasks via ssh.