From cce534320cffcd4590b1ad1e3422a69b7456804d Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Thu, 1 Nov 2018 12:01:34 -0600 Subject: [PATCH] Add custom environment files for standalone This change adds the ability to add additional environment files to the standalone deployment. Change-Id: I469380d5f401ed1aeeb104376d475673da07ccee --- roles/standalone/README.md | 2 ++ roles/standalone/defaults/main.yml | 2 ++ roles/standalone/templates/standalone.sh.j2 | 3 +++ 3 files changed, 7 insertions(+) diff --git a/roles/standalone/README.md b/roles/standalone/README.md index f5601f722..6f882e137 100644 --- a/roles/standalone/README.md +++ b/roles/standalone/README.md @@ -34,6 +34,8 @@ Role Variables - standalone_ansible_lint: <'false'> -- Perform ansible lint on the generated ansible playbooks +- standalone_custom_env_files: <'[]'> -- list of additional environment files to be added to the deployment command (do not include the -e) + Dependencies ------------ diff --git a/roles/standalone/defaults/main.yml b/roles/standalone/defaults/main.yml index 64da83a5f..9a56d9b73 100644 --- a/roles/standalone/defaults/main.yml +++ b/roles/standalone/defaults/main.yml @@ -26,3 +26,5 @@ standalone_selinux_mode: permissive standalone_libvirt_type: kvm standalone_container_cli: docker + +standalone_custom_env_files: [] diff --git a/roles/standalone/templates/standalone.sh.j2 b/roles/standalone/templates/standalone.sh.j2 index bb2929d76..99021ffb0 100644 --- a/roles/standalone/templates/standalone.sh.j2 +++ b/roles/standalone/templates/standalone.sh.j2 @@ -5,5 +5,8 @@ sudo openstack tripleo deploy \ -r {{ overcloud_templates_path }}/roles/{{ standalone_role }} \ -e "{{ working_dir }}/containers-prepare-parameters.yaml" \ -e "{{ working_dir }}/standalone_parameters.yaml" \ +{% if standalone_custom_env_files %} + -e {{ standalone_custom_env_files | join(' -e ') }} \ +{% endif %} --output-dir {{ working_dir }} \ --standalone