Reorganize and rejigger
This commit is contained in:
41
roles/pvc/tasks/pvc/main.yml
Normal file
41
roles/pvc/tasks/pvc/main.yml
Normal file
@ -0,0 +1,41 @@
|
||||
---
|
||||
- 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
|
||||
|
||||
- name: bootstrap a fresh cluster
|
||||
shell: /usr/bin/pvc init
|
||||
when: bootstrap is defined and bootstrap
|
||||
run_once: yes
|
||||
|
||||
- name: start and enable services
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: started
|
||||
enabled: yes
|
||||
with_items:
|
||||
- pvc-flush.service
|
||||
- pvcd.service
|
||||
- pvcd.target
|
||||
|
||||
- meta: flush_handlers
|
Reference in New Issue
Block a user