Skip to content
Snippets Groups Projects
Commit 0c2a15c0 authored by Simon Michnowicz's avatar Simon Michnowicz
Browse files

fixed keynames i.e. ansible_host_key_ecdsa_public => ansible_ssh_host_key_ecdsa_public

diit for ansible_host_key_rsa_public.
Removed superflous check "and hostvars[node]['ansible_host_key_rsa_public'] "
parent 2c3e4851
No related branches found
No related tags found
1 merge request!42fixed keynames i.e. ansible_host_key_ecdsa_public => ansible_ssh_host_key_ecdsa_public
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
{% for node in groups['all'] %} {% for node in groups['all'] %}
{% for interface in hostvars[node]['ansible_interfaces'] %} {% for interface in hostvars[node]['ansible_interfaces'] %}
{% if interface != "lo" %} {% if interface != "lo" %}
{% if 'ansible_host_key_rsa_public' in hostvars[node] and hostvars[node]['ansible_host_key_rsa_public'] %} {% if 'ansible_ssh_host_key_rsa_public' in hostvars[node] %}
{% set host = {'name': node, 'ip': hostvars[node]['ansible_'+interface]['ipv4']['address'], 'keytype':'ssh-rsa', 'key': hostvars[node]['ansible_host_key_rsa_public']} %} {% set host = {'name': node, 'ip': hostvars[node]['ansible_'+interface]['ipv4']['address'], 'keytype':'ssh-rsa', 'key': hostvars[node]['ansible_ssh_host_key_rsa_public']} %}
{% if nodelist.append(host) %} {% if nodelist.append(host) %}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if 'ansible_host_key_ecdsa_public' in hostvars[node] and hostvars[node]['ansible_host_key_ecdsa_public'] %} {% if 'ansible_ssh_host_key_ecdsa_public' in hostvars[node] %}
{% set host = {'name': node, 'ip': hostvars[node]['ansible_'+interface]['ipv4']['address'], 'keytype':'ecdsa-sha2-nistp256', 'key': hostvars[node]['ansible_host_key_ecdsa_public']} %} {% set host = {'name': node, 'ip': hostvars[node]['ansible_'+interface]['ipv4']['address'], 'keytype':'ecdsa-sha2-nistp256', 'key': hostvars[node]['ansible_ssh_host_key_ecdsa_public']} %}
{% if nodelist.append(host) %} {% if nodelist.append(host) %}
{% endif %} {% endif %}
{% endif %} {% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment