Handle creation and collection on bootstrap better
This commit is contained in:
parent
b922d47458
commit
f5cd8a94c2
|
@ -3,6 +3,9 @@
|
||||||
command: ip address add {{ pvc_upstream_floatingip }}/{{ pvc_upstream_netmask }} dev {{ pvc_upstream_device }}
|
command: ip address add {{ pvc_upstream_floatingip }}/{{ pvc_upstream_netmask }} dev {{ pvc_upstream_device }}
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- name: prepare database migrations
|
||||||
|
command: /usr/share/pvc/pvc-api-db-init
|
||||||
|
|
||||||
- name: start the API daemon
|
- name: start the API daemon
|
||||||
service:
|
service:
|
||||||
name: pvcapid.service
|
name: pvcapid.service
|
||||||
|
@ -36,3 +39,9 @@
|
||||||
- name: remove floating IP address to upstream interface
|
- name: remove floating IP address to upstream interface
|
||||||
command: ip address delete {{ pvc_upstream_floatingip }}/{{ pvc_upstream_netmask }} dev {{ pvc_upstream_device }}
|
command: ip address delete {{ pvc_upstream_floatingip }}/{{ pvc_upstream_netmask }} dev {{ pvc_upstream_device }}
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
|
- name: collect bootstrapped database migration files into the role
|
||||||
|
fetch:
|
||||||
|
src: /usr/share/pvc/migrations
|
||||||
|
dest: roles/pvc/files/pvc/{{ hostvars[inventory_hostname].group_names[0] }}/
|
||||||
|
flat: no
|
||||||
|
|
|
@ -46,14 +46,15 @@
|
||||||
- pdns.service
|
- pdns.service
|
||||||
- dnsmasq.service
|
- dnsmasq.service
|
||||||
|
|
||||||
- name: prepare Patroni database migrations (on all hosts)
|
|
||||||
command: /usr/share/pvc/pvc-api-db-init
|
|
||||||
when: bootstrap is defined and bootstrap and is_coordinator
|
|
||||||
|
|
||||||
- include: pvc/bootstrap.yml
|
- include: pvc/bootstrap.yml
|
||||||
run_once: yes
|
run_once: yes
|
||||||
when: bootstrap is defined and bootstrap and is_coordinator
|
when: bootstrap is defined and bootstrap and is_coordinator
|
||||||
|
|
||||||
|
- name: install bootstrap database migrations across all hosts
|
||||||
|
copy:
|
||||||
|
src: pvc/{{ hostvars[inventory_hostname].group_names[0] }}/migrations
|
||||||
|
dest: /usr/share/pvc/
|
||||||
|
|
||||||
- name: enable daemon services but don't start them
|
- name: enable daemon services but don't start them
|
||||||
service:
|
service:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
|
|
Loading…
Reference in New Issue