Allow customisation of AIO paths and filenames
In order to cater for implementations which 'overlay' or 'wrap' OSA and use the AIO bootstrap process, the following changes are implemented: - The paths to source the configuration files and scripts are now customisable so that the role may be executed by a playbook that is not in the OSA repository. - The path of the conf.d files may be provided to the role in order to allow conf.d files to be sourced from outside the OSA repository. - The resulting file names for the user_variables and user_secrets configuration are now customisable. Change-Id: I453342c88a6768641c96e3ff174aaeec5d554845
This commit is contained in:
parent
d8847875e8
commit
9fac196988
14
releasenotes/notes/aio-config-path-82cda1de6d1dfad7.yaml
Normal file
14
releasenotes/notes/aio-config-path-82cda1de6d1dfad7.yaml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
features:
|
||||
- It is now possible to customise the location of the configuration
|
||||
file source for the All-In-One (AIO) bootstrap process using the
|
||||
``bootstrap_host_aio_config_path`` variable.
|
||||
- It is now possible to customise the location of the scripts used
|
||||
in the All-In-One (AIO) boostrap process using the
|
||||
``bootstrap_host_aio_script_path`` variable.
|
||||
- It is now possible to customise the name of the
|
||||
``user_variables.yml`` file created by the All-In-One (AIO) bootstrap
|
||||
process using the ``bootstrap_host_user_variables_filename`` variable.
|
||||
- It is now possible to customise the name of the
|
||||
``user_secrets.yml`` file created by the All-In-One (AIO) bootstrap
|
||||
process using the ``bootstrap_host_user_secrets_filename`` variable.
|
@ -13,12 +13,23 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
## AIO user-space configuration options
|
||||
# Scenario used to bootstrap the host
|
||||
bootstrap_host_scenario: aio
|
||||
|
||||
#
|
||||
# Boolean option to implement OpenStack-Ansible configuration for an AIO
|
||||
# Switch to no for a multi-node configuration
|
||||
bootstrap_host_aio_config: yes
|
||||
#
|
||||
# Path to the location of the bootstrapping configuration files
|
||||
bootstrap_host_aio_config_path: "{{ playbook_dir }}/../etc/openstack_deploy"
|
||||
#
|
||||
# Path to the location of the scripts the bootstrap scripts use
|
||||
bootstrap_host_aio_script_path: "{{ playbook_dir }}/../scripts"
|
||||
#
|
||||
# The user space configuration file names to use
|
||||
bootstrap_host_user_variables_filename: "user_variables.yml"
|
||||
bootstrap_host_user_secrets_filename: "user_secrets.yml"
|
||||
|
||||
## Swap memory
|
||||
# If there is no swap memory present, the bootstrap will create a loopback disk
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
- name: Deploy user conf.d configuration
|
||||
config_template:
|
||||
src: "../etc/openstack_deploy/conf.d/{{ item.name }}"
|
||||
src: "{{ item.path | default(bootstrap_host_aio_config_path ~ '/conf.d') }}/{{ item.name }}"
|
||||
dest: "/etc/openstack_deploy/conf.d/{{ item.name | regex_replace('.aio$', '') }}"
|
||||
config_overrides: "{{ item.override | default({}) }}"
|
||||
config_type: "yaml"
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
- name: Deploy openstack_user_config
|
||||
config_template:
|
||||
src: "../etc/openstack_deploy/openstack_user_config.yml.aio"
|
||||
src: "{{ bootstrap_host_aio_config_path }}/openstack_user_config.yml.aio"
|
||||
dest: "/etc/openstack_deploy/openstack_user_config.yml"
|
||||
config_overrides: "{{ openstack_user_config_overrides | default({}) }}"
|
||||
config_type: "yaml"
|
||||
@ -47,15 +47,15 @@
|
||||
|
||||
- name: Deploy user_secrets file
|
||||
config_template:
|
||||
src: "../etc/openstack_deploy/user_secrets.yml"
|
||||
dest: "/etc/openstack_deploy/user_secrets.yml"
|
||||
src: "{{ bootstrap_host_aio_config_path }}/user_secrets.yml"
|
||||
dest: "/etc/openstack_deploy/{{ bootstrap_host_user_secrets_filename }}"
|
||||
config_overrides: "{{ user_secrets_overrides | default({}) }}"
|
||||
config_type: "yaml"
|
||||
tags:
|
||||
- deploy-user-secrets
|
||||
|
||||
- name: Generate any missing values in user_secrets
|
||||
command: ../scripts/pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml
|
||||
command: "{{ bootstrap_host_aio_script_path }}/pw-token-gen.py --file /etc/openstack_deploy/{{ bootstrap_host_user_secrets_filename }}"
|
||||
changed_when: false
|
||||
tags:
|
||||
- generate_secrets
|
||||
@ -85,7 +85,7 @@
|
||||
register: pip_conf_file
|
||||
|
||||
- name: Determine the fastest available OpenStack-Infra wheel mirror
|
||||
command: ../scripts/fastest-infra-wheel-mirror.py
|
||||
command: "{{ bootstrap_host_aio_script_path }}/fastest-infra-wheel-mirror.py"
|
||||
register: fastest_wheel_mirror
|
||||
when: not pip_conf_file.stat.exists
|
||||
|
||||
@ -107,7 +107,7 @@
|
||||
- name: Set the user_variables
|
||||
config_template:
|
||||
src: "user_variables.{{ bootstrap_host_scenario }}.yml.j2"
|
||||
dest: /etc/openstack_deploy/user_variables.yml
|
||||
dest: "/etc/openstack_deploy/{{ bootstrap_host_user_variables_filename }}"
|
||||
config_overrides: "{{ user_variables_overrides | default({}) }}"
|
||||
config_type: yaml
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user