Add sshd dns toggle to speed up Ansible

This adds a setting (disabled by default) to have the browbeat
installation playbook add the value

UseDNS no

to the overcloud node sshd config, for the scale lab exspecially this
can result in a 4x or greater speed improvement running ansible playbooks.

Not quite ludicrous speed, that's going to require pipelining, but it will do

Change-Id: I660cfc5a815bd08337f71e2ed9f97252794b09e2
This commit is contained in:
jkilpatr 2016-12-06 18:01:09 +00:00
parent b41523289c
commit 54d67eb1f1
3 changed files with 21 additions and 0 deletions

View File

@ -6,6 +6,7 @@
- hosts: controller
remote_user: "{{ host_remote_user }}"
roles:
- no-sshd-dns
- shaker-check
- hosts: undercloud
@ -13,3 +14,8 @@
roles:
- common
- browbeat
- hosts: compute
remote_user: "{{ host_remote_user }}"
roles:
- no-sshd-dns

View File

@ -51,6 +51,9 @@ images:
# DNS Server to add
dns_server: 8.8.8.8
# Disables dns lookup by overcloud sshd process
disable_ssh_dns: false
# epel7 rpm for collectd packages
epel7_rpm: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

View File

@ -0,0 +1,12 @@
# Disables DNS lookup in the overcloud sshd config file. Speeds up operations in environments with slow dns servers hugely.
---
- name: Disable DNS resolution in Overcloud sshd config
lineinfile: dest=/etc/ssh/sshd_config line="UseDNS no" state=present
become: true
when: "{{disable_ssh_dns}}"
- name: Restart sshd service
service: name=sshd state=restarted
become: true
when: "{{disable_ssh_dns}}"