您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

8 年前
7 年前
8 年前
123456789101112
  1. ---
  2. - name: scan ssh host
  3. local_action: command ssh-keyscan -t {{ssh_host_key_type}} {{ansible_host}}
  4. register: _ssh_keyscan_result
  5. changed_when: false
  6. - name: set ssh_host_key_ed25519_public
  7. set_fact:
  8. ssh_host_key_ed25519_public: "{{ _ssh_keyscan_result.stdout.split()[2] }}"
  9. changed_when: ssh_host_key_ed25519_public != _ssh_keyscan_result.stdout.split()[2]
  10. when: ssh_host_key_type == "ed25519"