don't use "include" to include tasks

Use "import_tasks" or "include_tasks" instead.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
pull/3171/head
Rishabh Dave 2018-08-21 19:53:35 +05:30 committed by Sébastien Han
parent 144c92b21f
commit 380168dadc
38 changed files with 108 additions and 108 deletions

View File

@ -3,7 +3,7 @@
- hosts: rgws
become: True
tasks:
- include: roles/ceph-rgw/tasks/multisite/destroy.yml
- include_tasks: roles/ceph-rgw/tasks/multisite/destroy.yml
handlers:
- include: roles/ceph-rgw/handlers/main.yml

View File

@ -1,6 +1,6 @@
---
- name: include pre_requisite.yml
include: pre_requisite.yml
include_tasks: pre_requisite.yml
- name: include start_agent.yml
include: start_agent.yml
include_tasks: start_agent.yml

View File

@ -1,8 +1,8 @@
---
- name: include pre_requisite.yml
include: pre_requisite.yml
include_tasks: pre_requisite.yml
- name: include create_users_keys.yml
include: create_users_keys.yml
include_tasks: create_users_keys.yml
when:
- user_config

View File

@ -5,7 +5,7 @@
ignore_errors: true
check_mode: no
- include: install_pypy.yml
- include_tasks: install_pypy.yml
when: need_python | failed
- name: check if there is pip
@ -14,5 +14,5 @@
ignore_errors: true
check_mode: no
- include: install_pip.yml
- include_tasks: install_pip.yml
when: need_pip | failed and need_python | failed

View File

@ -1,26 +1,26 @@
---
- name: include debian_community_repository.yml
include: debian_community_repository.yml
include_tasks: debian_community_repository.yml
when:
- ceph_repository == 'community'
- name: include debian_rhcs_repository.yml
include: debian_rhcs_repository.yml
include_tasks: debian_rhcs_repository.yml
when:
- ceph_repository == 'rhcs'
- name: include debian_dev_repository.yml
include: debian_dev_repository.yml
include_tasks: debian_dev_repository.yml
when:
- ceph_repository == 'dev'
- name: include debian_custom_repository.yml
include: debian_custom_repository.yml
include_tasks: debian_custom_repository.yml
when:
- ceph_repository == 'custom'
- name: include debian_uca_repository.yml
include: debian_uca_repository.yml
include_tasks: debian_uca_repository.yml
when:
- ceph_repository == 'uca'

View File

@ -1,21 +1,21 @@
---
- name: include redhat_community_repository.yml
include: redhat_community_repository.yml
include_tasks: redhat_community_repository.yml
when:
- ceph_repository == 'community'
- name: include redhat_rhcs_repository.yml
include: redhat_rhcs_repository.yml
include_tasks: redhat_rhcs_repository.yml
when:
- ceph_repository == 'rhcs'
- name: include redhat_dev_repository.yml
include: redhat_dev_repository.yml
include_tasks: redhat_dev_repository.yml
when:
- ceph_repository == 'dev'
- name: include redhat_custom_repository.yml
include: redhat_custom_repository.yml
include_tasks: redhat_custom_repository.yml
when:
- ceph_repository == 'custom'

View File

@ -1,5 +1,5 @@
---
- name: include suse_obs_repository.yml
include: suse_obs_repository.yml
include_tasks: suse_obs_repository.yml
when:
- ceph_repository == 'obs'

View File

@ -8,11 +8,11 @@
mode: 0644
- name: include prerequisite_rhcs_iso_install_debian.yml
include: prerequisite_rhcs_iso_install_debian.yml
include_tasks: prerequisite_rhcs_iso_install_debian.yml
when:
- ceph_repository_type == 'iso'
- name: include prerequisite_rhcs_cdn_install_debian.yml
include: prerequisite_rhcs_cdn_install_debian.yml
include_tasks: prerequisite_rhcs_cdn_install_debian.yml
when:
- ceph_repository_type == 'cdn'

View File

@ -1,6 +1,6 @@
---
- name: include configure_debian_repository_installation.yml
include: configure_debian_repository_installation.yml
include_tasks: configure_debian_repository_installation.yml
when:
- ceph_origin == 'repository'
@ -28,13 +28,13 @@
cache_valid_time: 3600
- name: include install_debian_packages.yml
include: install_debian_packages.yml
include_tasks: install_debian_packages.yml
when:
- (ceph_origin == 'repository' or ceph_origin == 'distro')
- ceph_repository != 'rhcs'
- name: include install_debian_rhcs_packages.yml
include: install_debian_rhcs_packages.yml
include_tasks: install_debian_rhcs_packages.yml
when:
- (ceph_origin == 'repository' or ceph_origin == 'distro')
- ceph_repository == 'rhcs'

View File

@ -1,15 +1,15 @@
---
- name: include configure_redhat_repository_installation.yml
include: configure_redhat_repository_installation.yml
include_tasks: configure_redhat_repository_installation.yml
when:
- ceph_origin == 'repository'
- name: include configure_redhat_local_installation.yml
include: configure_redhat_local_installation.yml
include_tasks: configure_redhat_local_installation.yml
when:
- ceph_origin == 'local'
- name: include install_redhat_packages.yml
include: install_redhat_packages.yml
include_tasks: install_redhat_packages.yml
when:
- (ceph_origin == 'repository' or ceph_origin == 'distro')

View File

@ -9,7 +9,7 @@
- ceph_origin != 'distro' or (ceph_origin == 'repository' and ceph_repository != 'obs')
- name: include configure_suse_repository_installation.yml
include: configure_suse_repository_installation.yml
include_tasks: configure_suse_repository_installation.yml
when:
- ceph_origin == 'repository'
@ -21,4 +21,4 @@
with_items: "{{ suse_package_dependencies }}"
- name: include install_suse_packages.yml
include: install_suse_packages.yml
include_tasks: install_suse_packages.yml

View File

@ -1,10 +1,10 @@
---
- name: include prerequisite_rhcs_iso_install.yml
include: prerequisite_rhcs_iso_install.yml
include_tasks: prerequisite_rhcs_iso_install.yml
when:
- ceph_repository_type == 'iso'
- name: include prerequisite_rhcs_cdn_install.yml
include: prerequisite_rhcs_cdn_install.yml
include_tasks: prerequisite_rhcs_cdn_install.yml
when:
- ceph_repository_type == 'cdn'

View File

@ -63,7 +63,7 @@
# override ceph_stable_release for ceph_dev and rhcs installations since ceph_stable_release is not mandatory
- name: include release-rhcs.yml
include: release-rhcs.yml
include_tasks: release-rhcs.yml
when:
- ceph_repository in ['rhcs', 'dev']
tags:
@ -85,7 +85,7 @@
static: False
- name: include facts_mon_fsid.yml
include: facts_mon_fsid.yml
include_tasks: facts_mon_fsid.yml
run_once: true
when:
- cephx
@ -94,13 +94,13 @@
- ceph_current_status.fsid is defined
- name: include create_rbd_client_dir.yml
include: create_rbd_client_dir.yml
include_tasks: create_rbd_client_dir.yml
- name: include configure_cluster_name.yml
include: configure_cluster_name.yml
include_tasks: configure_cluster_name.yml
- name: include configure_memory_allocator.yml
include: configure_memory_allocator.yml
include_tasks: configure_memory_allocator.yml
when:
- (ceph_tcmalloc_max_total_thread_cache | int) > 0
- osd_objectstore == 'filestore'

View File

@ -1,10 +1,10 @@
---
- name: include check_running_containers.yml
include: check_running_containers.yml
include_tasks: check_running_containers.yml
when:
- containerized_deployment
- name: include check_socket_non_container.yml
include: check_socket_non_container.yml
include_tasks: check_socket_non_container.yml
when:
- not containerized_deployment

View File

@ -1,9 +1,9 @@
---
- name: include check_running_cluster.yml
include: check_running_cluster.yml
include_tasks: check_running_cluster.yml
- name: include facts.yml
include: facts.yml
include_tasks: facts.yml
- name: include create_ceph_initial_dirs.yml
include: create_ceph_initial_dirs.yml
include_tasks: create_ceph_initial_dirs.yml

View File

@ -1,6 +1,6 @@
---
- name: include stat_ceph_files.yml
include: stat_ceph_files.yml
include_tasks: stat_ceph_files.yml
- name: fail if we find existing cluster files
fail:

View File

@ -1,12 +1,12 @@
---
- name: include system_checks.yml
include: system_checks.yml
include_tasks: system_checks.yml
- name: include check_mandatory_vars.yml
include: check_mandatory_vars.yml
include_tasks: check_mandatory_vars.yml
- name: include pre_requisites/prerequisites.yml
include: pre_requisites/prerequisites.yml
include_tasks: pre_requisites/prerequisites.yml
when:
- not is_atomic
@ -47,7 +47,7 @@
check_mode: no
- name: include checks.yml
include: checks.yml
include_tasks: checks.yml
when:
- (not containerized_deployment_with_kv and
((inventory_hostname in groups.get(mon_group_name, [])) or
@ -57,27 +57,27 @@
- not rolling_update | default(false)
- name: include misc/ntp_atomic.yml
include: misc/ntp_atomic.yml
include_tasks: misc/ntp_atomic.yml
when:
- is_atomic
- ansible_os_family == 'RedHat'
- ntp_service_enabled
- name: include misc/ntp_rpm.yml
include: misc/ntp_rpm.yml
include_tasks: misc/ntp_rpm.yml
when:
- not is_atomic
- ansible_os_family in ['RedHat', 'Suse']
- ntp_service_enabled
- name: include misc/ntp_debian.yml
include: misc/ntp_debian.yml
include_tasks: misc/ntp_debian.yml
when:
- ansible_os_family == 'Debian'
- ntp_service_enabled
- name: include fetch_image.yml
include: fetch_image.yml
include_tasks: fetch_image.yml
tags:
- fetch_container_image
@ -92,9 +92,9 @@
ceph_version: "{{ ceph_version.stdout.split(' ')[2] }}"
- name: include release.yml
include: release.yml
include_tasks: release.yml
# NOTE (jimcurtis): dirs_permissions.yml must precede fetch_configs.yml
# # because it creates the directories needed by the latter.
- name: include dirs_permissions.yml
include: dirs_permissions.yml
include_tasks: dirs_permissions.yml

View File

@ -1,6 +1,6 @@
---
- name: include ../checks/check_ntp_atomic.yml
include: ../checks/check_ntp_atomic.yml
include_tasks: ../checks/check_ntp_atomic.yml
when: is_atomic
- name: start the ntp service

View File

@ -1,6 +1,6 @@
---
- name: include ../checks/check_ntp_debian.yml
include: ../checks/check_ntp_debian.yml
include_tasks: ../checks/check_ntp_debian.yml
when:
- ansible_os_family == 'Debian'

View File

@ -1,6 +1,6 @@
---
- name: include ../checks/check_ntp_rpm.yml
include: ../checks/check_ntp_rpm.yml
include_tasks: ../checks/check_ntp_rpm.yml
when:
- ansible_os_family in ['RedHat', 'Suse']

View File

@ -1,9 +1,9 @@
---
- name: include remove_ceph_udev_rules.yml
include: remove_ceph_udev_rules.yml
include_tasks: remove_ceph_udev_rules.yml
- name: include debian_prerequisites.yml
include: debian_prerequisites.yml
include_tasks: debian_prerequisites.yml
when:
- ansible_distribution == 'Debian'
tags:

View File

@ -1,9 +1,9 @@
---
- name: include common.yml
include: common.yml
include_tasks: common.yml
- name: include non-container/prerequisites.yml
include: non-container/prerequisites.yml
include_tasks: non-container/prerequisites.yml
when:
- not containerized_deployment
@ -11,16 +11,16 @@
# and transfers them to /etc/ceph directory on each controller. SSL certs are used by
# the API for https support.
- name: include deploy_ssl_keys.yml
include: deploy_ssl_keys.yml
include_tasks: deploy_ssl_keys.yml
when:
- generate_crt|bool
- name: include non-container/configure_iscsi.yml
include: non-container/configure_iscsi.yml
include_tasks: non-container/configure_iscsi.yml
when:
- not containerized_deployment
- name: include containerized.yml
include: container/containerized.yml
include_tasks: container/containerized.yml
when:
- containerized_deployment

View File

@ -1,6 +1,6 @@
---
- name: include create_mds_filesystems.yml
include: create_mds_filesystems.yml
include_tasks: create_mds_filesystems.yml
when:
- inventory_hostname == groups[mds_group_name] | first
@ -11,12 +11,12 @@
- containerized_deployment
- name: include common.yml
include: common.yml
include_tasks: common.yml
- name: non_containerized.yml
include: non_containerized.yml
include_tasks: non_containerized.yml
when: not containerized_deployment
- name: containerized.yml
include: containerized.yml
include_tasks: containerized.yml
when: containerized_deployment

View File

@ -1,3 +1,3 @@
---
- name: include start_docker_mgr.yml
include: start_docker_mgr.yml
include_tasks: start_docker_mgr.yml

View File

@ -6,14 +6,14 @@
- containerized_deployment
- name: include common.yml
include: common.yml
include_tasks: common.yml
- name: include pre_requisite.yml
include: pre_requisite.yml
include_tasks: pre_requisite.yml
when: not containerized_deployment
- name: include docker/main.yml
include: docker/main.yml
include_tasks: docker/main.yml
when: containerized_deployment
- name: get enabled modules from ceph-mgr

View File

@ -1,13 +1,13 @@
---
- name: include copy_configs.yml
include: copy_configs.yml
include_tasks: copy_configs.yml
when: not containerized_deployment_with_kv
- name: include start_docker_monitor.yml
include: start_docker_monitor.yml
include_tasks: start_docker_monitor.yml
- name: include configure_ceph_command_aliases.yml
include: configure_ceph_command_aliases.yml
include_tasks: configure_ceph_command_aliases.yml
- name: wait for monitor socket to exist
command: "{{ docker_exec_cmd }} sh -c 'stat /var/run/ceph/{{ cluster }}-mon.{{ ansible_hostname }}.asok || stat /var/run/ceph/{{ cluster }}-mon.{{ ansible_fqdn }}.asok'"
@ -77,7 +77,7 @@
- hostvars[groups[mon_group_name][0]]['monitor_address_block'] != 'subnet'
- name: include fetch_configs.yml
include: fetch_configs.yml
include_tasks: fetch_configs.yml
run_once: true
when: not containerized_deployment_with_kv

View File

@ -6,11 +6,11 @@
- containerized_deployment
- name: include deploy_monitors.yml
include: deploy_monitors.yml
include_tasks: deploy_monitors.yml
when: not containerized_deployment
- name: include start_monitor.yml
include: start_monitor.yml
import_tasks: start_monitor.yml
when: not containerized_deployment
- name: include ceph_keys.yml
@ -20,7 +20,7 @@
static: no
- name: include secure_cluster.yml
include: secure_cluster.yml
include_tasks: secure_cluster.yml
delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true
when:
@ -28,17 +28,17 @@
- not containerized_deployment
- name: include docker/main.yml
include: docker/main.yml
include_tasks: docker/main.yml
when: containerized_deployment
- name: crush_rules.yml
include: crush_rules.yml
include_tasks: crush_rules.yml
when:
- crush_rule_config
- name: include set_osd_pool_default_pg_num.yml
include: set_osd_pool_default_pg_num.yml
include_tasks: set_osd_pool_default_pg_num.yml
- name: include calamari.yml
include: calamari.yml
include_tasks: calamari.yml
when: calamari

View File

@ -6,28 +6,28 @@
- containerized_deployment
- name: include common.yml
include: common.yml
include_tasks: common.yml
- name: include pre_requisite_non_container.yml
include: pre_requisite_non_container.yml
include_tasks: pre_requisite_non_container.yml
when:
- not containerized_deployment
- name: include pre_requisite_container.yml
include: pre_requisite_container.yml
include_tasks: pre_requisite_container.yml
when:
- containerized_deployment
- name: include create_rgw_nfs_user.yml
include: create_rgw_nfs_user.yml
import_tasks: create_rgw_nfs_user.yml
# NOTE (leseb): workaround for issues with ganesha and librgw
- name: include ganesha_selinux_fix.yml
include: ganesha_selinux_fix.yml
import_tasks: ganesha_selinux_fix.yml
when:
- not containerized_deployment
- ansible_os_family == 'RedHat'
- ansible_distribution_version >= '7.4'
- name: include start_nfs.yml
include: start_nfs.yml
import_tasks: start_nfs.yml

View File

@ -1,3 +1,3 @@
---
- name: include start_docker_osd.yml
include: start_docker_osd.yml
include_tasks: start_docker_osd.yml

View File

@ -18,10 +18,10 @@
static: False
- name: include ceph_disk_cli_options_facts.yml
include: ceph_disk_cli_options_facts.yml
include_tasks: ceph_disk_cli_options_facts.yml
- name: include build_devices.yml
include: build_devices.yml
include_tasks: build_devices.yml
- name: read information about the devices
parted:
@ -31,7 +31,7 @@
with_items: "{{ devices }}"
- name: include check_gpt.yml
include: check_gpt.yml
include_tasks: check_gpt.yml
when:
- osd_scenario != 'lvm'
@ -107,7 +107,7 @@
# Create the pools listed in openstack_pools
- name: include openstack_config.yml
include: openstack_config.yml
include_tasks: openstack_config.yml
when:
- openstack_config
- inventory_hostname == groups[osd_group_name] | last

View File

@ -1,3 +1,3 @@
---
- name: include start_docker_rbd_mirror.yml
include: start_docker_rbd_mirror.yml
include_tasks: start_docker_rbd_mirror.yml

View File

@ -6,25 +6,25 @@
- containerized_deployment
- name: include common.yml
include: common.yml
include_tasks: common.yml
- name: include pre_requisite.yml
include: pre_requisite.yml
include_tasks: pre_requisite.yml
when:
- not containerized_deployment
- name: include start_rbd_mirror.yml
include: start_rbd_mirror.yml
include_tasks: start_rbd_mirror.yml
when:
- not containerized_deployment
- name: include configure_mirroring.yml
include: configure_mirroring.yml
include_tasks: configure_mirroring.yml
when:
- ceph_rbd_mirror_configure
- not containerized_deployment
- name: include docker/main.yml
include: docker/main.yml
include_tasks: docker/main.yml
when:
- containerized_deployment

View File

@ -1,6 +1,6 @@
---
- name: include copy_configs.yml
include: copy_configs.yml
include_tasks: copy_configs.yml
- name: include start_docker_restapi.yml
include: start_docker_restapi.yml
include_tasks: start_docker_restapi.yml

View File

@ -6,16 +6,16 @@
- containerized_deployment
- name: include pre_requisite.yml
include: pre_requisite.yml
include_tasks: pre_requisite.yml
when:
- not containerized_deployment
- name: include start_restapi.yml
include: start_restapi.yml
include_tasks: start_restapi.yml
when:
- not containerized_deployment
- name: include docker/main.yml
include: docker/main.yml
include_tasks: docker/main.yml
when:
- containerized_deployment

View File

@ -1,3 +1,3 @@
---
- name: include start_docker_rgw.yml
include: start_docker_rgw.yml
include_tasks: start_docker_rgw.yml

View File

@ -1,6 +1,6 @@
---
- name: include common.yml
include: common.yml
include_tasks: common.yml
- name: include pre_requisite.yml
include: pre_requisite.yml

View File

@ -1,6 +1,6 @@
---
- name: include multisite checks
include: checks.yml
include_tasks: checks.yml
# Include the tasks depending on the zone type
- name: include master multisite tasks

View File

@ -58,17 +58,17 @@
- ceph_release_num[ceph_release] < ceph_release_num.luminous
- name: include check_system.yml
include: check_system.yml
include_tasks: check_system.yml
- name: include check_devices.yml
include: check_devices.yml
include_tasks: check_devices.yml
when:
- osd_group_name in group_names
- not osd_auto_discovery | default(False)
- osd_scenario != "lvm" and devices is not defined
- name: include check_eth_mon.yml
include: check_eth_mon.yml
include_tasks: check_eth_mon.yml
when:
- mon_group_name in group_names
- monitor_interface != "dummy"
@ -76,7 +76,7 @@
- monitor_address_block == "subnet"
- name: include check_eth_rgw.yml
include: check_eth_rgw.yml
include_tasks: check_eth_rgw.yml
when:
- rgw_group_name in group_names
- radosgw_interface != "dummy"