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.

15 line
512B

  1. ---
  2. - name: host_vars directory
  3. local_action: file path=host_vars/{{inventory_hostname}} state=directory
  4. - name: host_vars file
  5. local_action: template src=host_vars.j2 dest=host_vars/{{inventory_hostname}}/ssh_host_key.yml
  6. - name: write ssh_known_hosts file
  7. local_action: known_hosts
  8. args:
  9. path: "{{ playbook_dir }}/ssh_known_hosts"
  10. name: "{{ inventory_hostname }}"
  11. key: "{{ inventory_hostname }},{{ ssh_ip }} {{ _ssh_key_type[ssh_host_key_type] }} {{ _ssh_host_key[ssh_host_key_type] }}"