Am Mittwoch, 21. Juni 2017 18:29:57 UTC+2 schrieb Chris Jefferies: > > > So I got Ansible installed but now I want to know how best to deploy keys > to the 20 remote hosts. How do I automate the secure deployment of ssh > keys to these hosts? > > You deploy the public key of the ansible remote user to your servers. That's no problem since it is the *public* key. When you loose your secret key (which should never leave your ansible server) you are in trouble.
For aws put something like this to your user-data: #cloud-config # # more usefull things: https://cloudinit.readthedocs.io/en/latest/topics/examples.html # groups: ansible # users: - default # remove this if you don't want to have the default aws user (ec2-user|ubuntu) - name: ansible primary-group: ansible lock_passwd: true sudo: ALL=(ALL) NOPASSWD:ALL ssh-authorized-keys: - 'ssh-rsa <your ansible pub key here> ansible' -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7b79bb06-6b8f-461b-834f-468d39210319%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
