You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 年之前
12345678910111213
  1. ---
  2. - name: fetch ssh host key
  3. command:
  4. cat "{{ root_target_directory }}/etc/ssh/ssh_host_{{ ssh_host_key_type }}_key.pub"
  5. register: _ssh_host_key_cat_result
  6. changed_when: false
  7. - name: set ssh_host_key_ed25519_public
  8. set_fact:
  9. ssh_host_key_ed25519_public: "{{ _ssh_host_key_cat_result.stdout.split()[1] }}"
  10. changed_when: ssh_host_key_ed25519_public != _ssh_host_key_cat_result.stdout.split()[1]
  11. when: ssh_host_key_type == "ed25519"