Add client API to configuration
This commit is contained in:
parent
12d30acf90
commit
c438d2c9cd
|
@ -7,6 +7,14 @@ pvc_log_keepalive_cluster_details: True
|
|||
pvc_log_keepalive_storage_details: True
|
||||
pvc_log_console_lines: 1000
|
||||
|
||||
# Client API authentication configuration
|
||||
# > If the key is left blank, the API will listen UNAUTHENTICATED on all IP addresses of the
|
||||
# current primary node; use this with care and not in unsecured environments (e.g. if the
|
||||
# upstream network is untrusted).
|
||||
pvc_api_authentication_key: "" # Use pwgen to generate
|
||||
pvc_api_listen_address: "0.0.0.0"
|
||||
pvc_api_listen_port: "7370"
|
||||
|
||||
# Ceph storage
|
||||
pvc_ceph_storage_secret_uuid: "" # Use uuidgen to generate
|
||||
|
||||
|
|
|
@ -3,19 +3,22 @@
|
|||
apt:
|
||||
name:
|
||||
- pvc-daemon
|
||||
- pvc-client-cli
|
||||
- pvc-client-common
|
||||
- pvc-client-cli
|
||||
- pvc-client-api
|
||||
- debootstrap
|
||||
- ethtool
|
||||
state: latest
|
||||
|
||||
- name: install pvc configuration
|
||||
- name: install pvc configurations
|
||||
template:
|
||||
src: pvc/{{ item }}.j2
|
||||
dest: /etc/pvc/{{ item }}
|
||||
src: pvc/{{ item }}.yaml.j2
|
||||
dest: /etc/pvc/{{ item }}.yaml
|
||||
notify:
|
||||
- restart {{ item }}
|
||||
with_items:
|
||||
- pvcd.yaml
|
||||
notify: restart pvcd
|
||||
- pvcd
|
||||
- pvc-api
|
||||
|
||||
- name: stop and disable unneccessary services
|
||||
service:
|
||||
|
@ -29,7 +32,7 @@
|
|||
when: bootstrap is defined and bootstrap
|
||||
run_once: yes
|
||||
|
||||
- name: enable services but don't start them
|
||||
- name: enable daemon services but don't start them
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
enabled: yes
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
# pvc-api client configuration
|
||||
# {{ ansible_managed }}
|
||||
pvc:
|
||||
coordinators:
|
||||
{% for node in pvc_nodes if node.is_coordinator %}
|
||||
- {{ node.hostname }}.{{ pvc_cluster_domain }}
|
||||
{% endfor %}
|
||||
api:
|
||||
listen_address: "{{ pvc_api_listen_address }}"
|
||||
listen_port: "{{ pvc_api_listen_port }}"
|
||||
authentication:
|
||||
key: "{{ pvc_api_authentication_key }}"
|
Loading…
Reference in New Issue