47862b56bd
The dib_env_vars variable in the Bifrost's dib.yml file can contain the DIB_BLOCK_DEVICE_CONFIG environment variable which is always the Multiline-YAML data. By default, the format of the data is not preserved while the configuration is merged and saved for the bifrost-deploy container. This is because Ansible uses the PyYAML library which has a default 80 symbol string length limit. The official Ansible documentation [1] recommends using to_yaml or to_nice_yaml filters with width parameter. This change adds the same ability to the merge_yaml Ansible plugin. 1. https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#formatting-data-yaml-and-json The related change for the diskimage-builder to solve the issue with incorrect data provided by Kolla-Ansible is also provided: I3b74ede69eb064ad813a9108ec68a228e549e8bb Closes-Bug: #2014980 Related-Bug: #2014981 Change-Id: Id79445c0311916ac6c1beb3986e14f652ee5a63c Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
38 lines
975 B
YAML
38 lines
975 B
YAML
---
|
|
- name: Ensuring config directories exist
|
|
file:
|
|
path: "{{ node_config_directory }}/{{ item }}"
|
|
state: "directory"
|
|
owner: "{{ config_owner_user }}"
|
|
group: "{{ config_owner_group }}"
|
|
mode: "0770"
|
|
become: true
|
|
with_items:
|
|
- "bifrost"
|
|
|
|
- name: Generate bifrost configs
|
|
merge_yaml:
|
|
sources:
|
|
- "{{ role_path }}/templates/{{ item }}.yml.j2"
|
|
- "{{ node_custom_config }}/{{ item }}.yml"
|
|
- "{{ node_custom_config }}/bifrost/{{ item }}.yml"
|
|
dest: "{{ node_config_directory }}/bifrost/{{ item }}.yml"
|
|
yaml_width: 131072
|
|
mode: "0660"
|
|
become: true
|
|
with_items:
|
|
- "bifrost"
|
|
- "dib"
|
|
- "servers"
|
|
|
|
- name: Template ssh keys
|
|
template:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ node_config_directory }}/bifrost/{{ item.dest }}"
|
|
mode: "0660"
|
|
become: true
|
|
with_items:
|
|
- { src: "id_rsa", dest: "id_rsa" }
|
|
- { src: "id_rsa.pub", dest: "id_rsa.pub" }
|
|
- { src: "ssh_config", dest: "ssh_config" }
|