瀏覽代碼

save to home ssh_known_host keys

master
Markus Katharina Brechtel 7 年之前
父節點
當前提交
d3c7af2589
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. +2
    -1
      tasks/file.yml

+ 2
- 1
tasks/file.yml 查看文件

@@ -3,8 +3,9 @@
- name: write ssh_known_hosts file
local_action: known_hosts
args:
path: "{{ playbook_dir }}/ssh_known_hosts"
path: "{{ lookup('env','HOME') }}/.ssh/known_hosts"
name: "{{ item }}"
key: "{{ lookup('template','ssh_host_key.j2') }}"
with_items: "{{play_hosts}}"
when: hostvars[item].ssh_host_key_ed25519_public is defined
run_once: true

Loading…
取消
儲存