Ansible - openssh_keypair module

If you are not familiar with modules, check out Ansible - Getting Started with Modules.

The openssh_keypair module can be used to create a public certificate (such as id_rsa.pub) and private key (such as id_rsa). Or, the openssh_cert module can be used to create a public certificate (such as id_rsa.pub) using an existing private key (such as id_rsa). After generating a new keypair, you may want to use the authorized_key module to append the certificate to authorized_keys files.

- name: Create the id_rsa private key and id_rsa.pub public certificate
  openssh_keypair:
    path: /home/john.doe/.ssh/id_rsa

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.





Please enter 95bee in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |