net2grid.ssh_keypair

Ansible Role: SSH Keypair

This role copies an SSH keypair to the home directory of a specified user.

Requirements

No special requirements needed.

Dependencies

There are no dependencies.

Example Playbook

- hosts: servers
  vars_files:
    - vars/ssh_keypair.yml
  roles:
    - { role: net2grid.ssh_keypair }

In the vars/ssh_keypair.yml file (make sure to keep the pipe and spacing for the private key!):

ssh_user: root
ssh_user_homedir: /root
key_private: |
  -----BEGIN RSA PRIVATE KEY-----
  YiAyGtywXvqcy392xWskk1E8tz6ZNMO0PiNYCx+fLUOwy2lc3G5sBgVEQCBasdxd
  Fxx9H+VwmNpZXopQtBguuhijfbeX8IHn8voBo9EtTOl4tyEsnLHfyVWAqL3vFXHi
  -----END RSA PRIVATE KEY-----
key_public: "ssh-rsa AAAAB3NzaC1yc2EAAIlh4aKFgC1CcosaReT+921DT9UHLuTOj2Qb69 root@vm"

License

MIT / BSD

Author Information

This role was created in 2017 by NET2GRID BV.

Informazioni sul progetto

Copy SSH Keypair.

Installa
ansible-galaxy install net2grid.ssh_keypair
Licenza
mit
Download
438
Proprietario
We empower energy retailers to help consumers become energy efficient by unlocking value from Smart Meter data