Synchronize from one host to anothers

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

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