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

67 lines
1.5 KiB
YAML
Raw Normal View History

2019-06-09 00:11:06 -04:00
---
- name: install pvc packages
apt:
name:
- pvc-daemon-node
- pvc-daemon-api
- pvc-daemon-common
2019-07-06 02:49:25 -04:00
- pvc-client-cli
2019-06-25 22:13:16 -04:00
- ethtool
2019-12-01 20:26:08 -05:00
- jq
2022-10-07 00:41:03 -04:00
# default provisioner script helper programs
- debootstrap
- rinse
2019-06-09 00:11:06 -04:00
state: latest
when: newhost is defined and newhost
2019-06-09 00:11:06 -04:00
- name: install pvc node daemon configuration
2019-06-09 00:11:06 -04:00
template:
src: pvc/{{ item }}.j2
dest: /etc/pvc/{{ item }}
2019-06-09 00:11:06 -04:00
with_items:
- pvcnoded.yaml
- name: install pvc api daemon configuration
template:
src: pvc/{{ item }}.j2
dest: /etc/pvc/{{ item }}
with_items:
- pvcapid.yaml
- name: install API SSL certificate file
copy:
content: "{{ pvc_api_ssl_cert }}"
dest: /etc/pvc/api-cert.pem
mode: 0644
no_log: True
when: pvc_api_enable_ssl and not pvc_api_ssl_cert_path
- name: install API SSL key file
copy:
content: "{{ pvc_api_ssl_key }}"
dest: /etc/pvc/api-key.pem
mode: 0640
no_log: True
when: pvc_api_enable_ssl and not pvc_api_ssl_key_path
2019-06-09 00:11:06 -04:00
2021-08-21 15:41:44 -04:00
- name: install check_mk agent check
template:
src: pvc/pvc_status.j2
dest: /usr/lib/check_mk_agent/plugins/pvc_status
mode: 0755
2019-06-21 14:18:08 -04:00
- include: pvc/bootstrap.yml
2019-06-12 21:06:06 -04:00
run_once: yes
when: do_bootstrap is defined and do_bootstrap and is_coordinator
2019-06-12 10:33:48 -04:00
2019-06-12 21:06:06 -04:00
- meta: flush_handlers
- name: ensure services are started and running
service:
name: "{{ item }}"
state: started
enabled: yes
with_items:
- pvcnoded
when: newhost is defined and newhost