Change include: to include_tasks:

This removes warnings in Ansible 2.4+.

The patch also removes "static:" arguments which are no longer
used by Ansible.

Change-Id: I6341e694cee527b4bcf46f813c09db9f1bcabb00
This commit is contained in:
Major Hayden 2018-02-15 10:25:35 -06:00 committed by Jesse Pretorius (odyssey4me)
parent d53626d3bc
commit 044025ca0a
7 changed files with 23 additions and 29 deletions

View File

@ -18,7 +18,7 @@ galaxy_info:
description: Installation and setup of nova description: Installation and setup of nova
company: Rackspace company: Rackspace
license: Apache2 license: Apache2
min_ansible_version: 2.0 min_ansible_version: 2.4
platforms: platforms:
- name: Ubuntu - name: Ubuntu
versions: versions:

View File

@ -79,8 +79,7 @@
tags: tags:
- nova-pip-packages - nova-pip-packages
- include: consoles/nova_console_novnc_ssl.yml - include_tasks: consoles/nova_console_novnc_ssl.yml
static: no
when: when:
- nova_console_user_ssl_cert is defined - nova_console_user_ssl_cert is defined
- nova_console_user_ssl_key is defined - nova_console_user_ssl_key is defined

View File

@ -13,7 +13,7 @@
# 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: nova_compute_kvm_install.yml - include_tasks: nova_compute_kvm_install.yml
tags: tags:
- nova-install - nova-install
@ -34,7 +34,7 @@
- nova-kvm - nova-kvm
- name: Set kernel permissions to enable libguestfs features (Ubuntu) - name: Set kernel permissions to enable libguestfs features (Ubuntu)
include: nova_kernel_permissions.yml include_tasks: nova_kernel_permissions.yml
when: when:
- ansible_distribution == 'Ubuntu' - ansible_distribution == 'Ubuntu'
- nova_libvirt_inject_key | bool or nova_libvirt_inject_password | bool - nova_libvirt_inject_key | bool or nova_libvirt_inject_password | bool
@ -127,19 +127,19 @@
- nova-kvm - nova-kvm
- nova-libvirt - nova-libvirt
- include: nova_disable_smt.yml - include_tasks: nova_disable_smt.yml
when: when:
- ansible_architecture == 'ppc64le' - ansible_architecture == 'ppc64le'
tags: tags:
- nova-config - nova-config
- include: nova_enable_ksm.yml - include_tasks: nova_enable_ksm.yml
when: when:
- nova_compute_ksm_enabled | bool - nova_compute_ksm_enabled | bool
tags: tags:
- nova-config - nova-config
- include: nova_compute_kvm_virsh_net_remove.yml - include_tasks: nova_compute_kvm_virsh_net_remove.yml
tags: tags:
- nova-config - nova-config
- nova-kvm - nova-kvm

View File

@ -53,17 +53,16 @@
tags: tags:
- always - always
- include: nova_virt_detect.yml - include_tasks: nova_virt_detect.yml
static: no
tags: tags:
- always - always
- nova-config - nova-config
- include: nova_pre_install.yml - include_tasks: nova_pre_install.yml
tags: tags:
- nova-install - nova-install
- include: nova_install.yml - include_tasks: nova_install.yml
tags: tags:
- nova-install - nova-install
@ -74,36 +73,33 @@
tags: tags:
- nova-config - nova-config
- include: nova_post_install.yml - include_tasks: nova_post_install.yml
tags: tags:
- nova-config - nova-config
- include: nova_db_setup.yml - include_tasks: nova_db_setup.yml
static: no
when: when:
- "nova_services['nova-conductor']['group'] in group_names" - "nova_services['nova-conductor']['group'] in group_names"
- "inventory_hostname == ((groups['nova_conductor'] | intersect(ansible_play_hosts)) | list)[0]" - "inventory_hostname == ((groups['nova_conductor'] | intersect(ansible_play_hosts)) | list)[0]"
tags: tags:
- nova-config - nova-config
- include: nova_uwsgi.yml - include_tasks: nova_uwsgi.yml
tags: tags:
- nova-config - nova-config
- include: "nova_init_{{ ansible_service_mgr}}.yml" - include_tasks: "nova_init_{{ ansible_service_mgr}}.yml"
tags: tags:
- nova-config - nova-config
- include: nova_service_setup.yml - include_tasks: nova_service_setup.yml
static: no
when: when:
- "nova_services['nova-conductor']['group'] in group_names" - "nova_services['nova-conductor']['group'] in group_names"
- "inventory_hostname == ((groups['nova_conductor'] | intersect(ansible_play_hosts)) | list)[0]" - "inventory_hostname == ((groups['nova_conductor'] | intersect(ansible_play_hosts)) | list)[0]"
tags: tags:
- nova-config - nova-config
- include: nova_compute.yml - include_tasks: nova_compute.yml
static: no
when: when:
- "nova_services['nova-compute']['group'] in group_names" - "nova_services['nova-compute']['group'] in group_names"
tags: tags:
@ -132,7 +128,7 @@
# Also, we delegate this to a random host in the # Also, we delegate this to a random host in the
# conductor group in order to spread the load of # conductor group in order to spread the load of
# multiple forks across the group members. # multiple forks across the group members.
- include: nova_db_post_setup.yml - include_tasks: nova_db_post_setup.yml
delegate_to: "{{ conductor_host }}" delegate_to: "{{ conductor_host }}"
with_random_choice: "{{ groups['nova_conductor'] }}" with_random_choice: "{{ groups['nova_conductor'] }}"
loop_control: loop_control:

View File

@ -13,14 +13,14 @@
# 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: "drivers/{{ nova_virt_type }}/nova_compute_{{ nova_virt_type }}.yml" - include_tasks: "drivers/{{ nova_virt_type }}/nova_compute_{{ nova_virt_type }}.yml"
tags: tags:
- nova-install - nova-install
- include: nova_compute_key_populate.yml - include_tasks: nova_compute_key_populate.yml
tags: tags:
- nova-config - nova-config
- include: nova_compute_key_distribute.yml - include_tasks: nova_compute_key_distribute.yml
tags: tags:
- nova-config - nova-config

View File

@ -14,8 +14,7 @@
# limitations under the License. # limitations under the License.
- name: Setup powervm repository - name: Setup powervm repository
include: nova_install_apt_powervm.yml include_tasks: nova_install_apt_powervm.yml
static: no
when: when:
- "nova_services['nova-compute']['group'] in group_names" - "nova_services['nova-compute']['group'] in group_names"
- "nova_virt_type == 'powervm'" - "nova_virt_type == 'powervm'"
@ -167,7 +166,7 @@
- skip_ansible_lint - skip_ansible_lint
- nova-pip-packages - nova-pip-packages
- include: "consoles/nova_console_{{ nova_console_type }}_install.yml" - include_tasks: "consoles/nova_console_{{ nova_console_type }}_install.yml"
when: when:
- "nova_services['nova-novncproxy']['group'] in group_names or - "nova_services['nova-novncproxy']['group'] in group_names or
nova_services['nova-spicehtml5proxy']['group'] in group_names or nova_services['nova-spicehtml5proxy']['group'] in group_names or

View File

@ -84,7 +84,7 @@
- sudoers - sudoers
- nova-sudoers - nova-sudoers
- include: nova_selinux.yml - include_tasks: nova_selinux.yml
when: when:
- ansible_selinux.status is defined - ansible_selinux.status is defined
- ansible_selinux.status == "enabled" - ansible_selinux.status == "enabled"