---
# RHV and VSPHERE need ssh keys
- block:
  - name: Search for SSH key
    stat:
      path: ~/.ssh/id_rsa
    register: ssh_key

  - name: Create SSH key if it is missing
    command: "ssh-keygen -N '' -f ~/.ssh/id_rsa"
    when: not ssh_key.stat.exists
  when: "'rhv' in provider or 'vsphere' in provider"
...
