Add additional primary node switch
This commit is contained in:
parent
353399a407
commit
64ce09122d
|
@ -61,26 +61,36 @@
|
||||||
tags: pvc-cputuning
|
tags: pvc-cputuning
|
||||||
when: debian_version|int >= 11 and cpu_tuning is defined
|
when: debian_version|int >= 11 and cpu_tuning is defined
|
||||||
|
|
||||||
- name: restart server on first install
|
- block:
|
||||||
|
- name: restart server on first install
|
||||||
reboot:
|
reboot:
|
||||||
post_reboot_delay: 30
|
post_reboot_delay: 30
|
||||||
reboot_timeout: 1800
|
reboot_timeout: 1800
|
||||||
when: newhost is defined and newhost
|
|
||||||
tags: always
|
|
||||||
|
|
||||||
- name: wait 90 seconds for system to stabilize
|
- name: wait 90 seconds for system to stabilize
|
||||||
pause:
|
pause:
|
||||||
seconds: 90
|
seconds: 90
|
||||||
become: no
|
become: no
|
||||||
connection: local
|
connection: local
|
||||||
when: newhost is defined and newhost
|
|
||||||
tags: always
|
|
||||||
|
|
||||||
- name: restart pvcnoded on first install
|
- name: restart pvcnoded on first install
|
||||||
service:
|
service:
|
||||||
name: pvcnoded
|
name: pvcnoded
|
||||||
state: restarted
|
state: restarted
|
||||||
throttle: 1
|
throttle: 1
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- name: wait 30 seconds for system to stabilize
|
||||||
|
pause:
|
||||||
|
seconds: 30
|
||||||
|
become: no
|
||||||
|
connection: local
|
||||||
|
|
||||||
|
- name: set first node as primary coordinator on first install
|
||||||
|
command: "pvc node primary --wait"
|
||||||
|
run_once: yes
|
||||||
|
delegate_to: "{{ item }}"
|
||||||
|
loop: "{{ ansible_play_hosts[0] }}"
|
||||||
|
|
||||||
when: newhost is defined and newhost
|
when: newhost is defined and newhost
|
||||||
tags: always
|
tags: always
|
||||||
|
|
Loading…
Reference in New Issue