MNAIO: Resolve all Ansible 2.5-related deprecation warnings

To resolve the warnings, we:

1. Use import_playbook instead of include for the conditional
   playbook inclusions in site.yml. TIL that using include_playbook
   does not work with conditionals.

2. Use include_tasks instead of include for the openstack-image-setup
   task set inclusion.

3. Switch to using 'is' instead of '|' for tests.

Change-Id: I6d68bd4fecda122a77f7934842c3479a4c0792fd
This commit is contained in:
Jesse Pretorius 2018-06-26 13:41:13 +01:00
parent 09c412e8b0
commit d0b0668657
6 changed files with 16 additions and 16 deletions

View File

@ -37,7 +37,7 @@
update_cache: yes
cache_valid_time: 600
register: _install_host_packages
until: _install_host_packages | success
until: _install_host_packages is success
retries: 3
delay: 15

View File

@ -36,7 +36,7 @@
update_cache: yes
cache_valid_time: 600
register: _install_host_packages
until: _install_host_packages | success
until: _install_host_packages is success
retries: 3
delay: 15

View File

@ -38,7 +38,7 @@
update_cache: yes
cache_valid_time: 600
register: _install_host_packages
until: _install_host_packages | success
until: _install_host_packages is success
retries: 3
delay: 15

View File

@ -110,7 +110,7 @@
- create_networks
# Install some Linux system images
- include: ./openstack-image-setup.yml
- include_tasks: "{{ playbook_dir }}/openstack-image-setup.yml"
with_items: "{{ images }}"
tags:
- create_images

View File

@ -38,7 +38,7 @@
update_cache: yes
cache_valid_time: 600
register: _install_required_host_packages
until: _install_required_host_packages | success
until: _install_required_host_packages is success
retries: 3
delay: 15
when:
@ -63,12 +63,12 @@
apt:
update_cache: yes
register: _update_apt_cache
until: _update_apt_cache | success
until: _update_apt_cache is success
retries: 3
delay: 15
when:
- "ansible_os_family == 'Debian'"
- "_add_apt_repo | changed"
- "_add_apt_repo is changed"
- name: Install host distro packages
package:
@ -77,7 +77,7 @@
update_cache: yes
cache_valid_time: 600
register: _install_host_packages
until: _install_host_packages | success
until: _install_host_packages is success
retries: 3
delay: 15
@ -213,7 +213,7 @@
- name: Set the host intefaces up
command: "/sbin/ifup {{ item.value.iface }}"
with_dict: "{{ mnaio_host_networks }}"
when: mnaio_bridges | changed
when: mnaio_bridges is changed
- name: Disable virsh default network
shell: |

View File

@ -13,30 +13,30 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- include: setup-host.yml
- import_playbook: setup-host.yml
when:
- setup_host | default(true) | bool
- include: deploy-acng.yml
- import_playbook: deploy-acng.yml
when:
- setup_pxeboot | default(true) | bool
- include: deploy-pxe.yml
- import_playbook: deploy-pxe.yml
when:
- setup_pxeboot | default(true) | bool
- include: deploy-dhcp.yml
- import_playbook: deploy-dhcp.yml
when:
- setup_dhcpd | default(true) | bool
- include: deploy-vms.yml
- import_playbook: deploy-vms.yml
when:
- deploy_vms | default(true) | bool
- include: deploy-osa.yml
- import_playbook: deploy-osa.yml
when:
- deploy_osa | default(true) | bool
- include: openstack-service-setup.yml
- import_playbook: openstack-service-setup.yml
when:
- configure_openstack | default(true) | bool