Files
pvc-ansible/roles/pvc/tasks/pvc/main.yml

41 lines
760 B
YAML
Raw Normal View History

2023-09-01 15:42:19 -04:00
---
- name: install pvc packages
apt:
name:
- pvc-daemon
- pvc-client-cli
- pvc-client-common
state: latest
- name: install pvc configuration
template:
src: pvc/{{ item }}.j2
dest: /etc/pvc/{{ item }}
with_items:
- pvcd.yaml
notify: restart pvcd
- name: stop and disable unneccessary services
service:
name: "{{ item }}"
state: stopped
enabled: no
with_items:
- pdns.service
2023-09-01 15:42:19 -04:00
- name: bootstrap a fresh cluster
shell: /usr/bin/pvc init
when: bootstrap is defined and bootstrap
run_once: yes
2023-09-01 15:42:19 -04:00
2023-09-01 15:42:20 -04:00
- name: enable services but don't start them
2023-09-01 15:42:19 -04:00
service:
name: "{{ item }}"
enabled: yes
with_items:
- pvc-flush.service
- pvcd.service
- pvcd.target
2023-09-01 15:42:19 -04:00
- meta: flush_handlers