Skip to content

Commit

Permalink
ansible: increase MaxStartups for jenkins-workspace
Browse files Browse the repository at this point in the history
This is necessary when many workers running tests try to access the
temp repo to download binaries simultaneously.

PR-URL: #1515
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Rod Vagg <[email protected]>
  • Loading branch information
joaocgreis committed Dec 6, 2018
1 parent a1957ef commit bd5a1fc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ansible/roles/jenkins-workspace/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---

#
# generic handlers for jenkins-workspace stuff
#

- name: restart sshd
service: name="{{ sshd_service_name }}" state=restarted
7 changes: 7 additions & 0 deletions ansible/roles/jenkins-workspace/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,10 @@
owner: "binary_tmp"
group: "binary_tmp"
mode: 0755

- name: Increase the maximum number of connections trying to authenticate
notify: restart sshd
lineinfile:
line: "MaxStartups 100:30:150"
dest: "{{ ssh_config }}"
regexp: "MaxStartups"
13 changes: 13 additions & 0 deletions ansible/roles/jenkins-workspace/vars/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---

#
# variables for jenkins-workspace
#

ssh_config: /etc/ssh/sshd_config

sshd_service_map: {
'ubuntu1604': 'ssh',
}

sshd_service_name: "{{ sshd_service_map[os]|default(sshd_service_map[os|stripversion])|default('sshd') }}"

0 comments on commit bd5a1fc

Please sign in to comment.