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:
parent
09c412e8b0
commit
d0b0668657
@ -37,7 +37,7 @@
|
|||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
cache_valid_time: 600
|
||||||
register: _install_host_packages
|
register: _install_host_packages
|
||||||
until: _install_host_packages | success
|
until: _install_host_packages is success
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 15
|
delay: 15
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
cache_valid_time: 600
|
||||||
register: _install_host_packages
|
register: _install_host_packages
|
||||||
until: _install_host_packages | success
|
until: _install_host_packages is success
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 15
|
delay: 15
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
cache_valid_time: 600
|
||||||
register: _install_host_packages
|
register: _install_host_packages
|
||||||
until: _install_host_packages | success
|
until: _install_host_packages is success
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 15
|
delay: 15
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@
|
|||||||
- create_networks
|
- create_networks
|
||||||
|
|
||||||
# Install some Linux system images
|
# Install some Linux system images
|
||||||
- include: ./openstack-image-setup.yml
|
- include_tasks: "{{ playbook_dir }}/openstack-image-setup.yml"
|
||||||
with_items: "{{ images }}"
|
with_items: "{{ images }}"
|
||||||
tags:
|
tags:
|
||||||
- create_images
|
- create_images
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
cache_valid_time: 600
|
||||||
register: _install_required_host_packages
|
register: _install_required_host_packages
|
||||||
until: _install_required_host_packages | success
|
until: _install_required_host_packages is success
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 15
|
delay: 15
|
||||||
when:
|
when:
|
||||||
@ -63,12 +63,12 @@
|
|||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
register: _update_apt_cache
|
register: _update_apt_cache
|
||||||
until: _update_apt_cache | success
|
until: _update_apt_cache is success
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 15
|
delay: 15
|
||||||
when:
|
when:
|
||||||
- "ansible_os_family == 'Debian'"
|
- "ansible_os_family == 'Debian'"
|
||||||
- "_add_apt_repo | changed"
|
- "_add_apt_repo is changed"
|
||||||
|
|
||||||
- name: Install host distro packages
|
- name: Install host distro packages
|
||||||
package:
|
package:
|
||||||
@ -77,7 +77,7 @@
|
|||||||
update_cache: yes
|
update_cache: yes
|
||||||
cache_valid_time: 600
|
cache_valid_time: 600
|
||||||
register: _install_host_packages
|
register: _install_host_packages
|
||||||
until: _install_host_packages | success
|
until: _install_host_packages is success
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 15
|
delay: 15
|
||||||
|
|
||||||
@ -213,7 +213,7 @@
|
|||||||
- name: Set the host intefaces up
|
- name: Set the host intefaces up
|
||||||
command: "/sbin/ifup {{ item.value.iface }}"
|
command: "/sbin/ifup {{ item.value.iface }}"
|
||||||
with_dict: "{{ mnaio_host_networks }}"
|
with_dict: "{{ mnaio_host_networks }}"
|
||||||
when: mnaio_bridges | changed
|
when: mnaio_bridges is changed
|
||||||
|
|
||||||
- name: Disable virsh default network
|
- name: Disable virsh default network
|
||||||
shell: |
|
shell: |
|
||||||
|
@ -13,30 +13,30 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- include: setup-host.yml
|
- import_playbook: setup-host.yml
|
||||||
when:
|
when:
|
||||||
- setup_host | default(true) | bool
|
- setup_host | default(true) | bool
|
||||||
|
|
||||||
- include: deploy-acng.yml
|
- import_playbook: deploy-acng.yml
|
||||||
when:
|
when:
|
||||||
- setup_pxeboot | default(true) | bool
|
- setup_pxeboot | default(true) | bool
|
||||||
|
|
||||||
- include: deploy-pxe.yml
|
- import_playbook: deploy-pxe.yml
|
||||||
when:
|
when:
|
||||||
- setup_pxeboot | default(true) | bool
|
- setup_pxeboot | default(true) | bool
|
||||||
|
|
||||||
- include: deploy-dhcp.yml
|
- import_playbook: deploy-dhcp.yml
|
||||||
when:
|
when:
|
||||||
- setup_dhcpd | default(true) | bool
|
- setup_dhcpd | default(true) | bool
|
||||||
|
|
||||||
- include: deploy-vms.yml
|
- import_playbook: deploy-vms.yml
|
||||||
when:
|
when:
|
||||||
- deploy_vms | default(true) | bool
|
- deploy_vms | default(true) | bool
|
||||||
|
|
||||||
- include: deploy-osa.yml
|
- import_playbook: deploy-osa.yml
|
||||||
when:
|
when:
|
||||||
- deploy_osa | default(true) | bool
|
- deploy_osa | default(true) | bool
|
||||||
|
|
||||||
- include: openstack-service-setup.yml
|
- import_playbook: openstack-service-setup.yml
|
||||||
when:
|
when:
|
||||||
- configure_openstack | default(true) | bool
|
- configure_openstack | default(true) | bool
|
||||||
|
Loading…
Reference in New Issue
Block a user