File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 18
18
register : __corosync_authkey_created
19
19
notify : Restart corosync
20
20
21
- - name : Copy authkey to other nodes
22
- synchronize : src=/etc/corosync/authkey dest=/etc/corosync/authkey
21
+ - name : Generate tmpdir for authkey
22
+ local_action : tempfile
23
+ register : authkey_tempfile
24
+ changed_when : False
25
+ when : inventory_hostname != groups[pacemaker_corosync_group][0]
26
+
27
+ - name : Fetch authkey for other nodes
28
+ fetch : src=/etc/corosync/authkey dest="{{ authkey_tempfile.path }}" flat=yes
23
29
delegate_to : " {{ groups[pacemaker_corosync_group][0] }}"
30
+ changed_when : False
31
+ when : inventory_hostname != groups[pacemaker_corosync_group][0]
32
+
33
+ - name : Copy authkey to other nodes
34
+ copy : src="{{ authkey_tempfile.path }}" dest=/etc/corosync/authkey mode=0400
24
35
when : inventory_hostname != groups[pacemaker_corosync_group][0]
25
36
notify : Restart corosync
26
37
38
+ - name : Clean up tmpdir
39
+ local_action :
40
+ module : file
41
+ path : " {{ authkey_tempfile.path }}"
42
+ state : " absent"
43
+ changed_when : False
44
+ when : inventory_hostname != groups[pacemaker_corosync_group][0]
45
+
27
46
- name : Chowns authkeys
28
47
file :
29
48
path : /etc/corosync/authkey
You can’t perform that action at this time.
0 commit comments