Replace obsoleted include with import_task/include_task

include has been deperecated and is removed from ansible-core 2.12
It should be replaced with include_task or import_task.

Change-Id: I339a5fba2321ce5e06fb046b735538d510f281cd
This commit is contained in:
Dmitriy Rabotyagov
2021-12-18 20:49:48 +02:00
committed by Jonathan Rosser
parent d0f894a0cd
commit 4ee08bfb94

View File

@@ -23,7 +23,7 @@
- bootstrap_host_data_disk_device_detect | bool - bootstrap_host_data_disk_device_detect | bool
# Before we do anything, check the minimum requirements # Before we do anything, check the minimum requirements
- include: check-requirements.yml - import_tasks: check-requirements.yml
tags: tags:
- check-requirements - check-requirements
@@ -41,7 +41,7 @@
- always - always
- name: Gather nodepool variables - name: Gather nodepool variables
include: gather_nodepool_vars.yml import_tasks: gather_nodepool_vars.yml
- name: Create the required directories - name: Create the required directories
file: file:
@@ -52,16 +52,20 @@
tags: tags:
- create-directories - create-directories
- include: install_packages.yml - import_tasks: install_packages.yml
tags: tags:
- install-packages - install-packages
# Prepare the data disk, if one is provided # Prepare the data disk, if one is provided
- include: prepare_data_disk.yml - include_tasks: prepare_data_disk.yml
when: when:
- bootstrap_host_data_disk_device != None - bootstrap_host_data_disk_device != None
args:
apply:
tags: tags:
- prepare-data-disk - prepare-data-disk
tags:
- always
# Symlink host repos to /openstack/src to match the lxc continer bind mount # Symlink host repos to /openstack/src to match the lxc continer bind mount
# NOTE(jrosser) this must happen *after* prepare_data_disk as /openstack may remounted # NOTE(jrosser) this must happen *after* prepare_data_disk as /openstack may remounted
@@ -75,100 +79,143 @@
# Prepare the swap space loopback disk # Prepare the swap space loopback disk
# This is only necessary if there isn't swap already # This is only necessary if there isn't swap already
- include: prepare_loopback_swap.yml - include_tasks: prepare_loopback_swap.yml
static: no
when: when:
- bootstrap_host_loopback_swap | bool - bootstrap_host_loopback_swap | bool
- ansible_facts['swaptotal_mb'] < 1 - ansible_facts['swaptotal_mb'] < 1
args:
apply:
tags: tags:
- prepare-loopback - prepare-loopback
tags:
- always
# Prepare the zfs storage loopback disk # Prepare the zfs storage loopback disk
- include: prepare_loopback_zfs.yml - include_tasks: prepare_loopback_zfs.yml
when: when:
- bootstrap_host_loopback_zfs | bool - bootstrap_host_loopback_zfs | bool
- bootstrap_host_data_disk_device == None - bootstrap_host_data_disk_device == None
- lxc_container_backing_store == 'zfs' - lxc_container_backing_store == 'zfs'
args:
apply:
tags: tags:
- prepare-loopback - prepare-loopback
tags:
- always
# Prepare the btrfs storage loopback disk # Prepare the btrfs storage loopback disk
- include: prepare_loopback_btrfs.yml - include_tasks: prepare_loopback_btrfs.yml
when: when:
- bootstrap_host_loopback_btrfs | bool - bootstrap_host_loopback_btrfs | bool
- bootstrap_host_data_disk_device == None - bootstrap_host_data_disk_device == None
- lxc_container_backing_store == 'btrfs' - lxc_container_backing_store == 'btrfs'
args:
apply:
tags: tags:
- prepare-loopback - prepare-loopback
tags:
- always
# Prepare the Cinder LVM VG loopback disk # Prepare the Cinder LVM VG loopback disk
# This is only necessary if bootstrap_host_loopback_cinder is set to yes # This is only necessary if bootstrap_host_loopback_cinder is set to yes
- include: prepare_loopback_cinder.yml - include_tasks: prepare_loopback_cinder.yml
when: when:
- bootstrap_host_loopback_cinder | bool - bootstrap_host_loopback_cinder | bool
args:
apply:
tags: tags:
- prepare-loopback - prepare-loopback
tags:
- always
# Prepare the Nova instance storage loopback disk # Prepare the Nova instance storage loopback disk
- include: prepare_loopback_nova.yml - include_tasks: prepare_loopback_nova.yml
when: when:
- bootstrap_host_loopback_nova | bool - bootstrap_host_loopback_nova | bool
args:
apply:
tags: tags:
- prepare-loopback - prepare-loopback
tags:
- always
# Prepare the Swift data storage loopback disks # Prepare the Swift data storage loopback disks
- include: prepare_loopback_swift.yml - include_tasks: prepare_loopback_swift.yml
when: when:
- bootstrap_host_loopback_swift | bool - bootstrap_host_loopback_swift | bool
args:
apply:
tags: tags:
- prepare-loopback - prepare-loopback
tags:
- always
# Prepare the Manila data storage loopback disks # Prepare the Manila data storage loopback disks
- include: prepare_loopback_manila.yml - include_tasks: prepare_loopback_manila.yml
when: when:
- bootstrap_host_loopback_manila | bool - bootstrap_host_loopback_manila | bool
args:
apply:
tags: tags:
- prepare-loopback - prepare-loopback
tags:
- always
# Prepare the Ceph cluster UUID and loopback disks # Prepare the Ceph cluster UUID and loopback disks
- include: prepare_ceph.yml - include_tasks: prepare_ceph.yml
when: when:
- bootstrap_host_ceph | bool - bootstrap_host_ceph | bool
args:
apply:
tags: tags:
- prepare-ceph - prepare-ceph
tags:
- always
# Prepare the NFS server and loopback disks # Prepare the NFS server and loopback disks
- include: prepare_nfs.yml - include_tasks: prepare_nfs.yml
when: when:
- bootstrap_host_nfs | bool - bootstrap_host_nfs | bool
args:
apply:
tags: tags:
- prepare-nfs - prepare-nfs
tags:
- always
# Ensure hostname/ip is consistent with inventory # Ensure hostname/ip is consistent with inventory
- include: prepare_hostname.yml - import_tasks: prepare_hostname.yml
tags: tags:
- prepare-hostname - prepare-hostname
# Prepare the network interfaces # Prepare the network interfaces
- include: prepare_networking.yml - import_tasks: prepare_networking.yml
tags: tags:
- prepare-networking - prepare-networking
# Ensure that there are both private and public ssh keys for root # Ensure that there are both private and public ssh keys for root
- include: prepare_ssh_keys.yml - import_tasks: prepare_ssh_keys.yml
tags: tags:
- prepare-ssh-keys - prepare-ssh-keys
# Prepare local squid proxy # Prepare local squid proxy
- include: prepare_squid.yml - include_tasks: prepare_squid.yml
when: when:
- "'proxy' in bootstrap_host_scenarios_expanded" - "'proxy' in bootstrap_host_scenarios_expanded"
args:
apply:
tags: tags:
- prepare-squid - prepare-squid
tags:
- always
# Put the OpenStack-Ansible configuration for an All-In-One on the host # Put the OpenStack-Ansible configuration for an All-In-One on the host
- include: prepare_aio_config.yml - include_tasks: prepare_aio_config.yml
when: when:
- bootstrap_host_aio_config | bool - bootstrap_host_aio_config | bool
args:
apply:
tags: tags:
- prepare-aio-config - prepare-aio-config
tags:
- always