Partially revert "Convert dynamic includes to static imports"

This reverts parts of commit 68d2839e18.
When running the nova playbooks without having "nova_virt_type" set. It
failed with:
"Error when evaluating variable in dynamic parent include path:
 drivers/{{ nova_virt_type }}/nova_compute_{{ nova_virt_type }}.yml.
 When using static imports, the parent dynamic include cannot utilize
 host facts or variables from inventory"
since the above commit. In ansible it's not allowed to call import_tasks
from a playbook which was included via include_tasks using a dynamic
include path. So we're switching back to "include_tasks" for the
affected playbook.
Change-Id: Ia0227886bd2cc59aab6d2861ef4aa9358d160925
Closes-Bug: 1845497
This commit is contained in:
Ralf Haferkamp
2019年09月26日 15:12:31 +02:00
parent 6a7a4bd6a6
commit 417ec1a296

View File

@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- import_tasks:nova_compute_kvm_install.yml
- include_tasks:nova_compute_kvm_install.yml
tags:
- nova-install
@@ -47,7 +47,7 @@
- nova-kvm
- name:Set kernel permissions to enable libguestfs features (Ubuntu)
import_tasks:nova_kernel_permissions.yml
include_tasks:nova_kernel_permissions.yml
when:
- ansible_distribution == 'Ubuntu'
- nova_libvirt_inject_key | bool or nova_libvirt_inject_password | bool
@@ -140,19 +140,19 @@
- nova-kvm
- nova-libvirt
- import_tasks:nova_disable_smt.yml
- include_tasks:nova_disable_smt.yml
when:
- ansible_architecture == 'ppc64le'
tags:
- nova-config
- import_tasks:nova_enable_ksm.yml
- include_tasks:nova_enable_ksm.yml
when:
- nova_compute_ksm_enabled | bool
tags:
- nova-config
- import_tasks:nova_compute_kvm_virsh_net_remove.yml
- include_tasks:nova_compute_kvm_virsh_net_remove.yml
tags:
- nova-config
- nova-kvm
Reference in New Issue
openstack/openstack-ansible-os_nova
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.