浏览代码

also save current ansible_host

master
父节点
当前提交
273c3088a2
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      templates/ssh_host_key.j2

+ 2
- 2
templates/ssh_host_key.j2 查看文件

@@ -1,5 +1,5 @@
{% if hostvars[item].ssh_ip is defined %}
{{ item }},{{ hostvars[item].ssh_ip }} ssh-ed25519 {{ hostvars[item].ssh_host_key_ed25519_public }}
{{ item }},{{ ansible_host }},{{ hostvars[item].ssh_ip }} ssh-ed25519 {{ hostvars[item].ssh_host_key_ed25519_public }}
{% else %}
{{ item }} ssh-ed25519 {{ hostvars[item].ssh_host_key_ed25519_public }}
{{ item }},{{ ansible_host }} ssh-ed25519 {{ hostvars[item].ssh_host_key_ed25519_public }}
{% endif %}

正在加载...
取消
保存