2019-06-09 00:11:06 -04:00
|
|
|
---
|
|
|
|
- name: install pvc packages
|
|
|
|
apt:
|
|
|
|
name:
|
2020-02-08 19:26:51 -05:00
|
|
|
- pvc-daemon-node
|
|
|
|
- pvc-daemon-api
|
|
|
|
- pvc-daemon-common
|
2019-07-06 02:49:25 -04:00
|
|
|
- pvc-client-cli
|
2019-06-24 12:22:24 -04:00
|
|
|
- debootstrap
|
2019-06-25 22:13:16 -04:00
|
|
|
- ethtool
|
2019-12-01 20:26:08 -05:00
|
|
|
- jq
|
2019-06-09 00:11:06 -04:00
|
|
|
state: latest
|
|
|
|
|
2021-05-13 10:14:57 -04:00
|
|
|
- name: install pvc node daemon configuration
|
2019-06-09 00:11:06 -04:00
|
|
|
template:
|
2019-07-08 11:33:14 -04:00
|
|
|
src: pvc/{{ item }}.j2
|
|
|
|
dest: /etc/pvc/{{ item }}
|
2019-07-06 02:49:25 -04:00
|
|
|
notify:
|
2020-02-08 19:26:51 -05:00
|
|
|
- restart pvcnoded
|
2019-06-09 00:11:06 -04:00
|
|
|
with_items:
|
2020-02-08 19:26:51 -05:00
|
|
|
- pvcnoded.yaml
|
2021-05-13 10:14:57 -04:00
|
|
|
|
|
|
|
- name: install pvc api daemon configuration
|
|
|
|
template:
|
|
|
|
src: pvc/{{ item }}.j2
|
|
|
|
dest: /etc/pvc/{{ item }}
|
|
|
|
notify:
|
|
|
|
- restart pvcapid
|
|
|
|
with_items:
|
2020-02-08 19:26:51 -05:00
|
|
|
- pvcapid.yaml
|
2019-07-08 11:33:14 -04:00
|
|
|
|
|
|
|
- name: install API SSL certificate file
|
|
|
|
copy:
|
|
|
|
content: "{{ pvc_api_ssl_cert }}"
|
|
|
|
dest: /etc/pvc/api-cert.pem
|
|
|
|
mode: 0644
|
|
|
|
no_log: True
|
2020-08-26 14:08:58 -04:00
|
|
|
when: pvc_api_enable_ssl and not pvc_api_ssl_cert_path
|
2019-07-08 11:33:14 -04:00
|
|
|
|
|
|
|
- name: install API SSL key file
|
|
|
|
copy:
|
|
|
|
content: "{{ pvc_api_ssl_key }}"
|
|
|
|
dest: /etc/pvc/api-key.pem
|
|
|
|
mode: 0640
|
|
|
|
no_log: True
|
2020-08-26 14:08:58 -04:00
|
|
|
when: pvc_api_enable_ssl and not pvc_api_ssl_key_path
|
2019-06-09 00:11:06 -04:00
|
|
|
|
2019-06-21 14:18:08 -04:00
|
|
|
- include: pvc/bootstrap.yml
|
2019-06-12 21:06:06 -04:00
|
|
|
run_once: yes
|
2020-02-15 22:49:48 -05:00
|
|
|
when: bootstrap is defined and bootstrap and is_coordinator
|
2019-06-12 10:33:48 -04:00
|
|
|
|
2019-12-01 20:24:18 -05:00
|
|
|
- name: install daily vacuum script
|
|
|
|
template:
|
|
|
|
src: pvc/pvc-vacuum.j2
|
|
|
|
dest: /etc/cron.daily/pvc-vacuum
|
|
|
|
mode: 0755
|
|
|
|
|
2019-06-12 21:06:06 -04:00
|
|
|
- meta: flush_handlers
|
2021-05-13 10:14:57 -04:00
|
|
|
|
|
|
|
- name: ensure services are started and running
|
|
|
|
service:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: started
|
|
|
|
enabled: yes
|
|
|
|
with_items:
|
|
|
|
- pvcnoded
|
|
|
|
when: bootstrap is not defined or not bootstrap
|