Try wrapping your mons variable in {{ }} like this...

delegate_to: {{ mons[0] }}


I'm pretty sure without them your variable is being interpreted as a
literal.


On Sat, Aug 1, 2015 at 2:01 AM, pixel fairy <[email protected]> wrote:

> making a playbook to set up ceph clients, so want to transfer a client key
> from server (a monitor host) to client. since the server and client are
> both far away and sitting next to each other, id like to copy between them,
> so of course, i tried
>
>    - name: make sure the client key is in place
>      copy: src=/etc/ceph/ceph.client.admin.keyring
> dest=/etc/pve/priv/ceph/rbd.keyring
>      delegate_to: mons[0]
>
> and to make sure it knew what i wanted,
>
> $ ansible mons[0] --list-hosts
>     c1
>
> ran the playbook and got this,
>
> failed: [proxbox -> mons[0]] => {"failed": true}
> msg: could not find src=/etc/ceph/ceph.client.admin.keyring
>
> (maybe it was looking on the local filesystem?)
>
> then i tried synchronize, as suggested here,
> http://stackoverflow.com/questions/25505146/how-to-copy-files-between-two-nodes-using-ansible
> but got this,
>
> fatal: [proxbox -> mons[0]] => SSH Error: ssh: Could not resolve hostname
> mons[0]: nodename nor servname provided, or not known
>
> does delegate_to not use the inventory?
>
>
>
> --
> 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/27bc3f75-6222-4c8d-bf0a-89068317bb9b%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/27bc3f75-6222-4c8d-bf0a-89068317bb9b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAOMCme6QEMUioSQu6pcHbdK%2B7obgMCz-5p2-F4BO%2BunhLj2aDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to