- name: Create SSH Keypair hosts: "{{ target }}" gather_facts: false vars: ssh_passphrase: !vault | $ANSIBLE_VAULT;1.1;AES256 61323235356163363166663139613464303262333231656236313335313133373330316431333139 3135643639363966653938663666653831393132633765340a306665393864343466376637386661 39353535616366393631333161613065356666626266396138633866346462316365663339613263 6564643935326565630a386266376230613230336564363066373730363239303763663666363462 35353634626464656436633165316336323839616463333064633363306337353534 tasks: - name: Generate ssh keypair on host ansible.builtin.shell: | ssh-keygen -t ed25519 -f "{{host_name}}_ed25519" -N "{{ssh_passphrase}}" -C "{{host_name}}@testenv" args: chdir: ~/.ssh executable: /bin/bash no_log: True