Skip to content
Snippets Groups Projects
Commit 61e2e6bd authored by Jupiter Hu's avatar Jupiter Hu
Browse files

commit known_host

parent e4f242f9
No related branches found
No related tags found
No related merge requests found
{% set nodelist = [] %} {% set nodelist = [] %}
{% for desktop in desktopNodeList %} {% for node in groups['all'] %}
{% for node in groups[desktop.name] %} {% for interface in hostvars[node]['ansible_interfaces'] %}
{% if hostvars[node]['ansible_'+desktop.interface] is defined %} {% if interface != "lo" %}
{% set host = {'name': node, 'ip': hostvars[node]['ansible_'+desktop.interface]['ipv4']['address'], 'rsa': hostvars[node]['ansible_ssh_host_key_rsa_public']} %} {% set host = {'name': node, 'ip': hostvars[node]['ansible_'+interface]['ipv4']['address'], 'rsa': hostvars[node]['ansible_ssh_host_key_rsa_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