48 lines
1021 B
YAML
48 lines
1021 B
YAML
- name: Initialize an empty list for our backends
|
|
set_fact:
|
|
enabled_backends: []
|
|
|
|
- include: hiera.yml
|
|
|
|
- include: enabled_backends.yml
|
|
|
|
- name: Generate config files
|
|
config_template:
|
|
src: cinder.conf.j2
|
|
dest: /tmp/cinder.conf
|
|
config_overrides: '{{cinder_config}}'
|
|
config_type: ini
|
|
|
|
- name: Generate config files
|
|
template:
|
|
src: cinder-volume-config.json.j2
|
|
dest: /tmp/cinder-volume-config.json
|
|
|
|
- name: Read configs into memory
|
|
slurp:
|
|
src: "/tmp/cinder.conf"
|
|
register: "cinder_conf"
|
|
|
|
- name: Read configs into memory
|
|
slurp:
|
|
src: "/tmp/cinder-volume-config.json"
|
|
register: "cinder_volume_config_json"
|
|
|
|
- name: Create cinder configmaps
|
|
ignore_errors: yes
|
|
k8s_v1_config_map:
|
|
name: cinder-api
|
|
namespace: "{{ namespace }}"
|
|
state: present
|
|
debug: yes
|
|
labels:
|
|
service: cinder
|
|
data:
|
|
config.json: |
|
|
{{cinder_volume_config_json['content'] | b64decode | to_json}}
|
|
|
|
cinder.conf: |
|
|
{{cinder_conf['content'] | b64decode}}
|
|
|
|
|