Add additional primary node switch

This commit is contained in:
Joshua Boniface 2023-09-01 15:42:30 -04:00
parent 353399a407
commit 64ce09122d
1 changed files with 30 additions and 20 deletions

View File

@ -61,20 +61,17 @@
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
- block:
- name: restart server on first install - 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:
@ -82,5 +79,18 @@
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