diff --git a/roles/overcloud-deploy/README.md b/roles/overcloud-deploy/README.md index 5d9263925..a92f11bf6 100644 --- a/roles/overcloud-deploy/README.md +++ b/roles/overcloud-deploy/README.md @@ -46,7 +46,8 @@ A description of the settable variables for this role should go here, including * `virt_type`: qemu|kvm default is qemu. kvm is only enabled when kvm-{intel|amd} kernel module can be loaded. * `topology_map`: undefined - a dictionary of roles with their scale (count) and flavor names. Example: topology_map: { 'Controller': { 'scale': 3, 'flavor': 'baremetal' } } - +* `extra_tht_configs`: -- a list of files to copy to the undercloud and add as + extra config to the overcloud-deployment command. Dependencies ------------ diff --git a/roles/overcloud-deploy/tasks/create-scripts.yml b/roles/overcloud-deploy/tasks/create-scripts.yml index 8bdfaa3ba..8e76640c5 100644 --- a/roles/overcloud-deploy/tasks/create-scripts.yml +++ b/roles/overcloud-deploy/tasks/create-scripts.yml @@ -1,4 +1,19 @@ --- +- name: Copy extra THT config files on the undercloud + copy: + src: "{{ item }}" + dest: "{{ working_dir }}" + with_items: "{{ extra_tht_configs|default([]) }}" + +- name: Add extra THT config file to the deploy command + set_fact: + extra_tht_config_args: >- + {{ extra_tht_config_args|default('') }} + {% if extra_tht_configs|default([])|length > 0 %} + -e {{ extra_tht_configs | default([]) | map('basename') | map('regex_replace', '(.*)', "{{ working_dir }}/\1") | join (' -e ') }} + {% endif %} + cacheable: true + # Generate a number of scripts from templates. These are scripts # rather than additional ansible tasks so that they can be run # manually from the undercloud host. diff --git a/roles/overcloud-prep-config/README.md b/roles/overcloud-prep-config/README.md index 8c0381dd2..273c8743a 100644 --- a/roles/overcloud-prep-config/README.md +++ b/roles/overcloud-prep-config/README.md @@ -23,8 +23,6 @@ Role Variables -- location of network-environment file to copy over - `undercloud_type`: -- can be overwritten with values like 'baremetal' or 'ovb' -- `extra_tht_configs`: -- a list of files to copy to the overcloud and add as - extra config to the overcloud-deployment command - `network_isolation_type`: single-nic-vlans, multiple-nics, bond-with-vlans, public-bond - type of network isolation to use (default: single-nic-vlans) [1] deprecated types - single_nic_vlans, bond_with_vlans, multi-nic diff --git a/roles/overcloud-prep-config/tasks/main.yml b/roles/overcloud-prep-config/tasks/main.yml index db94cb545..3ec0fe140 100644 --- a/roles/overcloud-prep-config/tasks/main.yml +++ b/roles/overcloud-prep-config/tasks/main.yml @@ -73,16 +73,3 @@ when: - overcloud_templates_refspec is defined or overcloud_templates_branch is defined - overcloud_templates_repo is defined - -- name: Copy extra THT config files on the undercloud - copy: - src: "{{ item }}" - dest: "{{ working_dir }}" - with_items: "{{ extra_tht_configs|default([]) }}" - -- name: Add extra THT config file to the deploy command - set_fact: - extra_tht_config_args: >- - {{ extra_tht_config_args|default('') }} - -e {{ working_dir }}/{{ item | basename }} - with_items: "{{ extra_tht_configs|default([]) }}"