# Synchronize from one host to anothers

**URL:** <https://forum.ansible.com/t/synchronize-from-one-host-to-anothers/24759>\
**Category:** Ansible Project\
**Created:** [June 19, 2017, 8:37am UTC](https://forum.ansible.com/t/synchronize-from-one-host-to-anothers/24759 "2017-06-19T08:37:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Debny](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@Daniel\_Debny](https://forum.ansible.com/u/Daniel_Debny)\
**Post date:** [June 19, 2017, 8:37am UTC](https://forum.ansible.com/t/synchronize-from-one-host-to-anothers/24759/1 "2017-06-19T08:37:58Z")

</div>

Hi!

I try run command “corosync-keygen -l creates=/etc/corosync/authkey” and send this key to all of my servers but I stil have problem with it. Can You help me?  
Just it looks like that and doesnt work:

- name: Generate corosync key  
shell: corosync-keygen -l creates=/etc/corosync/authkey  
run\_once: true  
notify:

- restart\_corosync

- ha\_authkey\_warning

- name: Synchronizacja  
synchronize: src=etc/corosync/authkey dest=/etc/corosync/authkey  
delegate\_to: 192.168.10.186

- name: Generate corosync configuration  
template: src=corosync.conf.j2 dest=/etc/corosync/corosync.conf force={{ corosync.force\_update }}  
notify: restart\_corosync

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [June 20, 2017, 5:14am UTC](https://forum.ansible.com/t/synchronize-from-one-host-to-anothers/24759/2 "2017-06-20T05:14:17Z")

</div>

It looks like you are missing a / in the src= part of your synchronize action, here:

- name: Synchronizacja  
synchronize: src=etc/corosync/authkey dest=/etc/corosync/authkey  
delegate\_to: 192.168.10.186

instead try

- name: Synchronizacja  
synchronize: src=/etc/corosync/authkey dest=/etc/corosync/authkey  
delegate\_to: 192.168.10.186

You might find it easier to use ‘yaml style’ module parameters like this

- name: Synchronizacja  
synchronize:  
src: /etc/corosync/authkey  
dest: /etc/corosync/authkey  
delegate\_to: 192.168.10.186

Personally I find this easier to read than the key=value key=value style.

Hope this helps,

Jon
