pvc-ansible/roles/pvc/tasks/pvc/bootstrap.yml
Joshua M. Boniface 458e7b4872 Use new init command location
Command was renamed in the PVC CLI to facilitate other "task" actions
like backup/restore.
2023-09-01 15:42:24 -04:00

29 lines
781 B
YAML

---
- name: add floating IP address to upstream interface
command: ip address add {{ pvc_upstream_floatingip }}/{{ pvc_upstream_netmask }} dev {{ pvc_upstream_device }}
ignore_errors: yes
- name: apply database migrations
command: /usr/share/pvc/pvc-api-db-upgrade
- name: start the API daemon
service:
name: pvcapid.service
state: started
- name: wait 5s for daemon to initialize
pause:
seconds: 5
- name: initialize a fresh PVC cluster
command: pvc -c local task init -y
- name: stop the API daemon
service:
name: pvcapid.service
state: stopped
- name: remove floating IP address to upstream interface
command: ip address delete {{ pvc_upstream_floatingip }}/{{ pvc_upstream_netmask }} dev {{ pvc_upstream_device }}
ignore_errors: yes