Bootstrap FreeKB - Ansible - Create public certificate and private key using the openssh_keypair module
Ansible - Create public certificate and private key using the openssh_keypair module

Updated:   |  Ansible articles

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

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


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