Allow to apply custom configuration to Nova SSH config
In case compute nodes using non-standard SSH port or some other hacky connection between each other, deployers might need to supply extra configuration inside it. community.general.ssh_config module was not used, as it requires extra `paramiko` module to be installed on each destination host. Change-Id: Ic79aa391e729adf61f5653dd3cf72fee1708e2f5
This commit is contained in:
parent
3719d5bf8b
commit
5884318116
@ -769,6 +769,12 @@ nova_pki_console_install_certificates:
|
||||
mode: "0640"
|
||||
condition: "{{ nova_pki_console_condition | bool }}"
|
||||
|
||||
# Extra settings which will be applied for `nova` user for offline
|
||||
# migrations and resizes. Example:
|
||||
# nova_ssh_custom_config:
|
||||
# Port: 2022
|
||||
nova_ssh_custom_config: {}
|
||||
|
||||
# host which holds the ssh certificate authority
|
||||
nova_ssh_keypairs_setup_host: "{{ openstack_ssh_keypairs_setup_host | default('localhost') }}"
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
Host *
|
||||
StrictHostKeyChecking no
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added variable ``nova_ssh_custom_config`` which allows to apply
|
||||
extra configuration for SSH connection established by Nova Compute
|
||||
while perfroming offline migrations or resizes.
|
||||
Can be leveraged to define a custom SSH port or ProxyJump.
|
@ -23,8 +23,8 @@
|
||||
- always
|
||||
|
||||
- name: Create the nova SSH config file
|
||||
copy:
|
||||
src: "ssh_config"
|
||||
template:
|
||||
src: "ssh_config.j2"
|
||||
dest: "{{ nova_system_home_folder }}/.ssh/config"
|
||||
owner: "{{ nova_system_user_name }}"
|
||||
group: "{{ nova_system_user_name }}"
|
||||
|
5
templates/ssh_config.j2
Normal file
5
templates/ssh_config.j2
Normal file
@ -0,0 +1,5 @@
|
||||
Host *
|
||||
StrictHostKeyChecking no
|
||||
{% for key, value in nova_ssh_custom_config.items() %}
|
||||
{{ key }} {{ value }}
|
||||
{% endfor %}
|
Loading…
Reference in New Issue
Block a user