[ansible-project] Re: Creating and distributing ssh keys

2015-01-14 Thread Mark Maas
AAAH! Ofcourse! I need to reference the hostvars again! Thanks! Djeez, of all things ansible, the different ways or creating and referencing variables is by far the one I struggle with the most ;-) Thanks! Mark On Tuesday, January 13, 2015 at 10:45:29 AM UTC+1, Dan Vaida wrote: > > --- > > -

[ansible-project] Re: Creating and distributing ssh keys

2015-01-13 Thread Dan Vaida
--- - hosts: all sudo: yes tasks: - name: Generate root sshkey user: > name=root generate_ssh_key=yes ssh_key_bits=4096 ssh_key_type=rsa ssh_key_file=/root/.ssh/id_rsa_{{ ansible_hostname }} register: rootkeys tags: cephkeys

[ansible-project] Re: Creating and distributing ssh keys

2015-01-12 Thread Mark Maas
On Sunday, January 11, 2015 at 12:02:10 PM UTC+1, Dan Vaida wrote: > > as I see it, based on your input, you have two problems: > 1. you're creating the users and generating unique keys on each of the > target hosts > Correct, and that's what I'm trying to get. > 2. you're trying to iterate t

[ansible-project] Re: Creating and distributing ssh keys

2015-01-11 Thread Dan Vaida
as I see it, based on your input, you have two problems: 1. you're creating the users and generating unique keys on each of the target hosts 2. you're trying to iterate through the 'rootkeys' in a way that will never work for the key parameter. So, I'd use 'delegate_to: localhost' on the user ta

[ansible-project] Re: Creating and distributing ssh keys

2015-01-11 Thread Mark Maas
On Saturday, January 10, 2015 at 8:36:24 PM UTC+1, Dan Vaida wrote: > > Why not generate the keys on the box you're running Ansible from and then > simply set them up on those three servers with > http://docs.ansible.com/authorized_key_module.html ? > >> >> I'd love to, but I'm getting this mes

[ansible-project] Re: Creating and distributing ssh keys

2015-01-10 Thread Dan Vaida
Why not generate the keys on the box you're running Ansible from and then simply set them up on those three servers with http://docs.ansible.com/authorized_key_module.html ? On Thursday, 8 January 2015 11:11:35 UTC+1, Mark Maas wrote: > > Just to clarify: > > I want to create keys on three serve

[ansible-project] Re: Creating and distributing ssh keys

2015-01-08 Thread Mark Maas
Just to clarify: I want to create keys on three servers, and then distribute those keys amongst those same three servers. These servers will be deleted and created every day, and I want the keys to be new every day as well ;-) The public keys are there, they are available as variables, I just n