Hi,

In my playbook I copy the ssh public key to my local ansible master.

- name: fetch pub key from server
  fetch: src=/home/user/.ssh/id_rsa.pub dest=/tmp/keys/{{ 
inventory_hostname_short }}_id_rsa.pub flat=yes

Next I use authorized_key module to place it in authorized keys of another 
user on the server.

- name: ensure public key is authorized_keys on local host
  authorized_key: user=user2
                          key="{{ lookup('file', '/tmp/keys/{{ 
inventory_hostname_short }}_id_rsa.pub') }}"

The issue I'm having is that the next task is to copy the public key to the 
authorized keys of the backup server using "delegate_to"

- name: ensure public key is authorized_keys on backup server
  authorized_key: user=user2
                          key="{{ lookup('file', '/tmp/keys/{{ 
inventory_hostname_short }}_id_rsa.pub') }}"
  delegate_to: backup_server

This use to work, but no longer does as it seems to ignore the delegate_to 
and copies to authorized to server again.

Using ansible 2.0.1.0

Regards

-- 
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/17bbaa03-1a45-4a21-b7fc-79fa7c42fa19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to