- name: Remove ssh key
  command: "shred ~/.ssh/id_rsa"

- name: Remove host key information from known hosts
  known_hosts:
    name: "{{ ssh_key.fqdn }}"
    key: "{{ ssh_key.ssh_known_hosts }}"
    state: absent
  when: ssh_key.ssh_known_hosts is defined and ssh_key.fqdn is defined