Question

Is there any example on how to provide the SSH key for a user using the ssh_key_bits option?

The documentation only specifies the 'password' option and searching for 'ssh_key_bits' only has 5 pages on Google and none of them are useful.

Était-ce utile?

La solution

Sure you can try something like this:

---
- name: Create User with ssh key bits
  hosts: all
  user: youruser
  sudo: True

  tasks:
    - name: Create user
      user: name=newuser generate_ssh_key=yes ssh_key_bits=4096
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top