Merge "Fix Ssh connection issues on openstack-ansible-ops mnaio builds"
This commit is contained in:
commit
2cb67be496
@ -177,6 +177,47 @@
|
|||||||
- deploy-vms
|
- deploy-vms
|
||||||
|
|
||||||
|
|
||||||
|
- name: Set MaxSessions and MaxStartups to reduce connection failures
|
||||||
|
hosts: vm_servers
|
||||||
|
gather_facts: "{{ gather_facts | default(true) }}"
|
||||||
|
pre_tasks:
|
||||||
|
- name: Gather variables for each operating system
|
||||||
|
include_vars: "{{ item }}"
|
||||||
|
with_first_found:
|
||||||
|
- "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
||||||
|
- "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||||
|
- "{{ playbook_dir }}/vars/{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
||||||
|
- "{{ playbook_dir }}/vars/{{ ansible_distribution | lower }}.yml"
|
||||||
|
- "{{ playbook_dir }}/vars/{{ ansible_os_family | lower }}.yml"
|
||||||
|
tags:
|
||||||
|
- always
|
||||||
|
tasks:
|
||||||
|
- lineinfile:
|
||||||
|
path: /etc/ssh/sshd_config
|
||||||
|
line: MaxStartups 100
|
||||||
|
state: present
|
||||||
|
regexp: '^MaxStartups.*$'
|
||||||
|
notify:
|
||||||
|
- restart sshd
|
||||||
|
- lineinfile:
|
||||||
|
path: /etc/ssh/sshd_config
|
||||||
|
line: MaxSessions 100
|
||||||
|
state: present
|
||||||
|
regexp: '^MaxSessions.*$'
|
||||||
|
notify:
|
||||||
|
- restart sshd
|
||||||
|
handlers:
|
||||||
|
- name: restart sshd
|
||||||
|
service:
|
||||||
|
name: "{{ ssh_service_name }}"
|
||||||
|
state: restarted
|
||||||
|
|
||||||
|
environment: "{{ deployment_environment_variables | default({}) }}"
|
||||||
|
|
||||||
|
tags:
|
||||||
|
- deploy-vms
|
||||||
|
|
||||||
|
|
||||||
- name: Setup cinder host volume
|
- name: Setup cinder host volume
|
||||||
hosts: cinder_hosts:swift_hosts
|
hosts: cinder_hosts:swift_hosts
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
@ -276,3 +317,5 @@
|
|||||||
|
|
||||||
tags:
|
tags:
|
||||||
- deploy-vms
|
- deploy-vms
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,3 +43,6 @@ mnaio_pkg_cache_server_distro_packages:
|
|||||||
- apt-cacher-ng
|
- apt-cacher-ng
|
||||||
|
|
||||||
mnaio_host_iptables_service: "{{ (ansible_distribution | lower + '-' + ansible_distribution_version | lower == 'ubuntu-14.04') | ternary('iptables-persistent', 'netfilter-persistent') }}"
|
mnaio_host_iptables_service: "{{ (ansible_distribution | lower + '-' + ansible_distribution_version | lower == 'ubuntu-14.04') | ternary('iptables-persistent', 'netfilter-persistent') }}"
|
||||||
|
|
||||||
|
ssh_service_name: ssh
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user