From: David Galloway Date: Tue, 19 Dec 2017 01:17:05 +0000 (-0500) Subject: all: Use import_tasks vs include_tasks so tags work again X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F365%2Fhead;p=ceph-cm-ansible.git all: Use import_tasks vs include_tasks so tags work again See https://github.com/ansible/ansible/pull/33468 Signed-off-by: David Galloway --- diff --git a/roles/cobbler/tasks/main.yml b/roles/cobbler/tasks/main.yml index 6ebbab0..8252091 100644 --- a/roles/cobbler/tasks/main.yml +++ b/roles/cobbler/tasks/main.yml @@ -1,5 +1,5 @@ --- -- include_tasks: ipmi_secrets.yml +- import_tasks: ipmi_secrets.yml tags: - always @@ -28,13 +28,13 @@ tags: - always -- include_tasks: yum_systems.yml +- import_tasks: yum_systems.yml when: ansible_pkg_mgr == "yum" -- include_tasks: apt_systems.yml +- import_tasks: apt_systems.yml when: ansible_pkg_mgr == "apt" -- include_tasks: pip.yml +- import_tasks: pip.yml tags: - pip @@ -70,24 +70,24 @@ enabled: yes - name: Update settings - include_tasks: settings.yml + import_tasks: settings.yml tags: - settings -- include_tasks: fetch_cm_repos.yml +- import_tasks: fetch_cm_repos.yml tags: - cm_repos -- include_tasks: upload_templates.yml +- import_tasks: upload_templates.yml tags: - templates -- include_tasks: distro_prep.yml +- import_tasks: distro_prep.yml tags: - distros - distro_prep -- include_tasks: restart.yml +- import_tasks: restart.yml - name: Run cobbler check command: cobbler check diff --git a/roles/cobbler/tasks/settings.yml b/roles/cobbler/tasks/settings.yml index 8905a85..e9037f0 100644 --- a/roles/cobbler/tasks/settings.yml +++ b/roles/cobbler/tasks/settings.yml @@ -24,7 +24,7 @@ line: "server{{':'}} {% for setting in settings %}{% if setting.name == 'server' %}{{ setting.value }}{% endif %}{% endfor %}" register: server_value -- include_tasks: restart.yml +- import_tasks: restart.yml when: users_digest|changed or dynamic_settings|changed or server_value|changed - name: Update settings diff --git a/roles/cobbler/tasks/setup-redhat.yml b/roles/cobbler/tasks/setup-redhat.yml index 7e9047e..e853612 100644 --- a/roles/cobbler/tasks/setup-redhat.yml +++ b/roles/cobbler/tasks/setup-redhat.yml @@ -1,8 +1,8 @@ --- - name: Include rhel 7.x specific tasks. - include_tasks: redhat/rhel_7.yml + import_tasks: redhat/rhel_7.yml when: ansible_distribution_major_version == "7" - name: Include rhel 6.x specific tasks. - include_tasks: redhat/rhel_6.yml + import_tasks: redhat/rhel_6.yml when: ansible_distribution_major_version == "6" diff --git a/roles/cobbler/tasks/yum_systems.yml b/roles/cobbler/tasks/yum_systems.yml index 5d6b87c..6d99759 100644 --- a/roles/cobbler/tasks/yum_systems.yml +++ b/roles/cobbler/tasks/yum_systems.yml @@ -13,5 +13,5 @@ when: cobbler_extra_packages|length > 0 # configure red hat specific things -- include_tasks: setup-redhat.yml +- import_tasks: setup-redhat.yml when: ansible_distribution in ('RedHat', 'CentOS') diff --git a/roles/cobbler_profile/tasks/import_distro.yml b/roles/cobbler_profile/tasks/import_distro.yml index 977b021..ef4dfcb 100644 --- a/roles/cobbler_profile/tasks/import_distro.yml +++ b/roles/cobbler_profile/tasks/import_distro.yml @@ -41,10 +41,10 @@ ignore_errors: true changed_when: false -- include_tasks: import_distro_iso.yml +- import_tasks: import_distro_iso.yml when: profile_type|default('') == 'iso' -- include_tasks: import_distro_image.yml +- import_tasks: import_distro_image.yml when: profile_type|default('') == 'image' # If either the profile already existed or we successfully imported the @@ -55,17 +55,17 @@ ((profile is defined and profile.stdout == distro_name) or (import is defined and import.rc == 0)) -- include_tasks: update_kickstart.yml +- import_tasks: update_kickstart.yml when: distro.kickstart is defined and distro.kickstart != '' and profile_found -- include_tasks: update_kernel_options.yml +- import_tasks: update_kernel_options.yml when: distro.kernel_options is defined and distro.kernel_options != '' and profile_found -- include_tasks: update_kernel_options_post.yml +- import_tasks: update_kernel_options_post.yml when: distro.kernel_options_post is defined and distro.kernel_options_post != '' and profile_found diff --git a/roles/cobbler_profile/tasks/import_distro_image.yml b/roles/cobbler_profile/tasks/import_distro_image.yml index fa095cd..01535c2 100644 --- a/roles/cobbler_profile/tasks/import_distro_image.yml +++ b/roles/cobbler_profile/tasks/import_distro_image.yml @@ -19,7 +19,7 @@ set_fact: initrd_path: "{{ other_image_dir }}/{{ initrd_name }}" -- include_tasks: download_image.yml +- import_tasks: download_image.yml when: distro.kernel != '' - name: Set arch diff --git a/roles/cobbler_profile/tasks/import_distro_iso.yml b/roles/cobbler_profile/tasks/import_distro_iso.yml index eb7ad57..8cc382e 100644 --- a/roles/cobbler_profile/tasks/import_distro_iso.yml +++ b/roles/cobbler_profile/tasks/import_distro_iso.yml @@ -7,7 +7,7 @@ set_fact: iso_path: "{{ iso_dir }}/{{ iso_name }}" -- include_tasks: download_iso.yml +- import_tasks: download_iso.yml when: distro.iso != '' # we do this so that if the playbook fails diff --git a/roles/cobbler_profile/tasks/main.yml b/roles/cobbler_profile/tasks/main.yml index 908a4df..def403e 100644 --- a/roles/cobbler_profile/tasks/main.yml +++ b/roles/cobbler_profile/tasks/main.yml @@ -1,4 +1,4 @@ --- -- include_tasks: import_distro.yml +- import_tasks: import_distro.yml tags: - distros diff --git a/roles/cobbler_systems/tasks/main.yml b/roles/cobbler_systems/tasks/main.yml index cb97e73..59f2c60 100644 --- a/roles/cobbler_systems/tasks/main.yml +++ b/roles/cobbler_systems/tasks/main.yml @@ -1,5 +1,5 @@ --- -- include_tasks: populate_systems.yml +- import_tasks: populate_systems.yml tags: - systems diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 5a39f76..f6899ed 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -15,29 +15,29 @@ - entitlements # configure things specific to yum systems -- include_tasks: yum_systems.yml +- import_tasks: yum_systems.yml when: ansible_pkg_mgr == "yum" # configure things specific to apt systems -- include_tasks: apt_systems.yml +- import_tasks: apt_systems.yml when: ansible_pkg_mgr == "apt" -- include_tasks: zypper_systems.yml +- import_tasks: zypper_systems.yml when: ansible_pkg_mgr == "zypper" # configure Kerberos -- include_tasks: kerberos.yml +- import_tasks: kerberos.yml tags: - kerberos # upload custom disk monitoring scripts -- include_tasks: disk_monitoring.yml +- import_tasks: disk_monitoring.yml tags: - monitoring-scripts - nagios # configure nagios -- include_tasks: nagios.yml +- import_tasks: nagios.yml when: ansible_pkg_mgr != "zypper" tags: - nagios @@ -50,7 +50,7 @@ - nagios # configure selinux for nagios -- include_tasks: nrpe-selinux.yml +- import_tasks: nrpe-selinux.yml when: ansible_os_family == "RedHat" and (selinux_status is defined and selinux_status.stdout != "Disabled") tags: diff --git a/roles/common/tasks/rhel-entitlements.yml b/roles/common/tasks/rhel-entitlements.yml index d3c148c..99f9b2a 100644 --- a/roles/common/tasks/rhel-entitlements.yml +++ b/roles/common/tasks/rhel-entitlements.yml @@ -72,7 +72,7 @@ when: not unregistered_beta_distro|skipped - name: Run beta_repos.yml playbook for Beta/Alpha/RC release - include_tasks: beta_repos.yml + import_tasks: beta_repos.yml when: ansible_distribution_version not in rhsm_release_list.stdout_lines - name: Get list of enabled RHSM repos diff --git a/roles/common/tasks/yum_systems.yml b/roles/common/tasks/yum_systems.yml index 36ca8dc..562142b 100644 --- a/roles/common/tasks/yum_systems.yml +++ b/roles/common/tasks/yum_systems.yml @@ -49,7 +49,7 @@ when: ansible_distribution == 'Fedora' and ansible_distribution_major_version|int >= 22 # configure Red Hat entitlements with subscription-manager -- include_tasks: rhel-entitlements.yml +- import_tasks: rhel-entitlements.yml when: ansible_distribution == 'RedHat' and beta_distro == false @@ -57,7 +57,7 @@ - entitlements # create and manage epel.repo -- include_tasks: epel.yml +- import_tasks: epel.yml when: ansible_distribution == "CentOS" or ansible_distribution == 'RedHat' diff --git a/roles/downstream-setup/tasks/cleanup.yml b/roles/downstream-setup/tasks/cleanup.yml index 522468a..94c1d6f 100644 --- a/roles/downstream-setup/tasks/cleanup.yml +++ b/roles/downstream-setup/tasks/cleanup.yml @@ -1,7 +1,7 @@ --- - debug: msg="Performing cleanup related tasks..." -- include_tasks: yum_repos.yml +- import_tasks: yum_repos.yml when: remove_yum_repos|length > 0 vars: repos: "{{ remove_yum_repos }}" @@ -11,21 +11,21 @@ - set_fact: repos_to_remove: "{% for repo in yum_repos%}{{ repo.name }}{% if not loop.last %},{% endif %}{% endfor %}" -- include_tasks: remove_yum_repos.yml +- import_tasks: remove_yum_repos.yml when: yum_repos|length > 0 vars: repos: "{{ repos_to_remove.split(',') }}" tags: - delete-yum-repos -- include_tasks: disable_yum_repos.yml +- import_tasks: disable_yum_repos.yml when: enable_yum_repos|length > 0 vars: repos: "{{ enable_yum_repos }}" tags: - disable-yum-repos -- include_tasks: enable_yum_repos.yml +- import_tasks: enable_yum_repos.yml when: disable_yum_repos|length > 0 vars: repos: "{{ disable_yum_repos }}" diff --git a/roles/downstream-setup/tasks/main.yml b/roles/downstream-setup/tasks/main.yml index 4269da8..35133f5 100644 --- a/roles/downstream-setup/tasks/main.yml +++ b/roles/downstream-setup/tasks/main.yml @@ -5,7 +5,7 @@ # These are tasks which perform actions corresponding to the names of # the variables they use. For example, `disable_yum_repos` would actually # disable all repos defined in that list. -- include_tasks: setup.yml +- import_tasks: setup.yml when: not cleanup and (ansible_distribution == "CentOS" or ansible_distribution == "RedHat") static: no @@ -14,6 +14,6 @@ # enable all repos defined in that list. The primary use for this is through # teuthology, so that you can tell a teuthology run to disable a set of repos # for the test run but then re-enable them during the teuthology cleanup process. -- include_tasks: cleanup.yml +- import_tasks: cleanup.yml when: cleanup and (ansible_distribution == "CentOS" or ansible_distribution == "RedHat") static: no diff --git a/roles/downstream-setup/tasks/setup.yml b/roles/downstream-setup/tasks/setup.yml index 0de4322..7c554b0 100644 --- a/roles/downstream-setup/tasks/setup.yml +++ b/roles/downstream-setup/tasks/setup.yml @@ -1,26 +1,26 @@ --- -- include_tasks: yum_repos.yml +- import_tasks: yum_repos.yml when: yum_repos|length > 0 vars: repos: "{{ yum_repos }}" tags: - yum-repos -- include_tasks: remove_yum_repos.yml +- import_tasks: remove_yum_repos.yml when: remove_yum_repos|length > 0 vars: repos: "{{ remove_yum_repos }}" tags: - delete-yum-repos -- include_tasks: disable_yum_repos.yml +- import_tasks: disable_yum_repos.yml when: disable_yum_repos|length > 0 vars: repos: "{{ disable_yum_repos }}" tags: - disable-yum-repos -- include_tasks: enable_yum_repos.yml +- import_tasks: enable_yum_repos.yml when: enable_yum_repos|length > 0 vars: repos: "{{ enable_yum_repos }}" diff --git a/roles/firmware/tasks/areca/main.yml b/roles/firmware/tasks/areca/main.yml index 8d9b458..be0af13 100644 --- a/roles/firmware/tasks/areca/main.yml +++ b/roles/firmware/tasks/areca/main.yml @@ -30,5 +30,5 @@ (current_areca_version.stdout != latest_{{ areca_model_pretty }}_version) - name: Run Areca firmware update playbook - include_tasks: roles/firmware/tasks/areca/areca-update.yml + import_tasks: roles/firmware/tasks/areca/areca-update.yml when: need_areca_update is defined and need_areca_update == true diff --git a/roles/firmware/tasks/main.yml b/roles/firmware/tasks/main.yml index 824781d..3da7d63 100644 --- a/roles/firmware/tasks/main.yml +++ b/roles/firmware/tasks/main.yml @@ -1,25 +1,25 @@ --- -- include_tasks: mira/bios.yml +- import_tasks: mira/bios.yml tags: - bios when: '"mira" in ansible_hostname' -- include_tasks: mira/bmc.yml +- import_tasks: mira/bmc.yml tags: - bmc when: '"mira" in ansible_hostname' -- include_tasks: areca/main.yml +- import_tasks: areca/main.yml tags: - areca -- include_tasks: smithi/bmc.yml +- import_tasks: smithi/bmc.yml tags: - bmc when: '"smithi" in ansible_hostname' # NVMe firmware flashing is only supported on RHEL/CentOS -- include_tasks: smithi/nvme.yml +- import_tasks: smithi/nvme.yml tags: - nvme when: '"smithi" in ansible_hostname and ansible_pkg_mgr == "yum"' diff --git a/roles/firmware/tasks/mira/bios.yml b/roles/firmware/tasks/mira/bios.yml index 2ec9b3c..b68fcd2 100644 --- a/roles/firmware/tasks/mira/bios.yml +++ b/roles/firmware/tasks/mira/bios.yml @@ -10,5 +10,5 @@ when: current_bios_version.stdout != latest_bios_version - name: Include BIOS update logic - include_tasks: roles/firmware/tasks/mira/bios-update.yml + import_tasks: roles/firmware/tasks/mira/bios-update.yml when: need_bios_update is defined and need_bios_update == true diff --git a/roles/firmware/tasks/mira/bmc.yml b/roles/firmware/tasks/mira/bmc.yml index 521e109..64d0a23 100644 --- a/roles/firmware/tasks/mira/bmc.yml +++ b/roles/firmware/tasks/mira/bmc.yml @@ -23,5 +23,5 @@ when: current_bmc_version.stdout != latest_bmc_version - name: Include BMC update logic - include_tasks: roles/firmware/tasks/mira/bmc-update.yml + import_tasks: roles/firmware/tasks/mira/bmc-update.yml when: need_bmc_update is defined and need_bmc_update == true diff --git a/roles/firmware/tasks/smithi/bmc.yml b/roles/firmware/tasks/smithi/bmc.yml index 097026f..f11beb7 100644 --- a/roles/firmware/tasks/smithi/bmc.yml +++ b/roles/firmware/tasks/smithi/bmc.yml @@ -23,5 +23,5 @@ when: current_bmc_version.stdout != latest_bmc_version - name: Include BMC update logic - include_tasks: roles/firmware/tasks/smithi/bmc-update.yml + import_tasks: roles/firmware/tasks/smithi/bmc-update.yml when: need_bmc_update is defined and need_bmc_update == true diff --git a/roles/gateway/tasks/main.yml b/roles/gateway/tasks/main.yml index 320c7c5..255ec87 100644 --- a/roles/gateway/tasks/main.yml +++ b/roles/gateway/tasks/main.yml @@ -6,22 +6,22 @@ - always # Install and update system packages -- include_tasks: packages.yml +- import_tasks: packages.yml tags: - packages # Configure networking -- include_tasks: network.yml +- import_tasks: network.yml tags: - networking # Configure firewalld -- include_tasks: firewall.yml +- import_tasks: firewall.yml tags: - firewall # Configure fail2ban -- include_tasks: fail2ban.yml +- import_tasks: fail2ban.yml tags: - fail2ban @@ -32,7 +32,7 @@ mode: 0755 # Manage OpenVPN users list using secrets repo -- include_tasks: users.yml +- import_tasks: users.yml tags: - users diff --git a/roles/nameserver/tasks/main.yml b/roles/nameserver/tasks/main.yml index 9a366a0..c35dd0c 100644 --- a/roles/nameserver/tasks/main.yml +++ b/roles/nameserver/tasks/main.yml @@ -6,7 +6,7 @@ - always # Install and update system packages -- include_tasks: packages.yml +- import_tasks: packages.yml tags: - packages @@ -28,17 +28,17 @@ - always # Configure firewalld -- include_tasks: firewall.yml +- import_tasks: firewall.yml tags: - firewall # Configure BIND -- include_tasks: config.yml +- import_tasks: config.yml tags: - config # Compile and write zone files -- include_tasks: records.yml +- import_tasks: records.yml tags: - records when: (named_conf_slave is undefined) or diff --git a/roles/packages/tasks/cleanup.yml b/roles/packages/tasks/cleanup.yml index 4827d5d..43c934f 100644 --- a/roles/packages/tasks/cleanup.yml +++ b/roles/packages/tasks/cleanup.yml @@ -1,6 +1,6 @@ --- - debug: msg="Performing cleanup related tasks..." -- include_tasks: packages.yml +- import_tasks: packages.yml vars: state: "absent" diff --git a/roles/packages/tasks/main.yml b/roles/packages/tasks/main.yml index fa05c7c..29b24b3 100644 --- a/roles/packages/tasks/main.yml +++ b/roles/packages/tasks/main.yml @@ -2,7 +2,7 @@ # These are tasks which perform actions corresponding to the names of # the variables they use. For example, `disable_yum_repos` would actually # disable all repos defined in that list. -- include_tasks: setup.yml +- import_tasks: setup.yml when: not cleanup # These are tasks which reverse the actions corresponding to the names of @@ -10,5 +10,5 @@ # enable all repos defined in that list. The primary use for this is through # teuthology, so that you can tell a teuthology run to disable a set of repos # for the test run but then re-enable them during the teuthology cleanup process. -- include_tasks: cleanup.yml +- import_tasks: cleanup.yml when: cleanup diff --git a/roles/packages/tasks/setup.yml b/roles/packages/tasks/setup.yml index 3fa645a..42db932 100644 --- a/roles/packages/tasks/setup.yml +++ b/roles/packages/tasks/setup.yml @@ -1,4 +1,4 @@ --- -- include_tasks: packages.yml +- import_tasks: packages.yml vars: state: "present" diff --git a/roles/paddles/tasks/main.yml b/roles/paddles/tasks/main.yml index 7092e1a..16a0279 100644 --- a/roles/paddles/tasks/main.yml +++ b/roles/paddles/tasks/main.yml @@ -25,24 +25,24 @@ tags: - always -- include_tasks: apt_systems.yml +- import_tasks: apt_systems.yml when: ansible_pkg_mgr == "apt" # Yum systems support is not implemented yet. -- include_tasks: yum_systems.yml +- import_tasks: yum_systems.yml when: ansible_pkg_mgr == "yum" # Set up the paddles user -- include_tasks: setup_user.yml +- import_tasks: setup_user.yml # Set up the actual paddles project -- include_tasks: setup_paddles.yml +- import_tasks: setup_paddles.yml # Set up the DB which paddles uses -- include_tasks: setup_db.yml +- import_tasks: setup_db.yml # Configure the system to run paddles as a daemon -- include_tasks: setup_service.yml +- import_tasks: setup_service.yml # Configure nginx as a reverse proxy -- include_tasks: nginx.yml +- import_tasks: nginx.yml diff --git a/roles/pcp/tasks/collector.yml b/roles/pcp/tasks/collector.yml index 622623d..55051f0 100644 --- a/roles/pcp/tasks/collector.yml +++ b/roles/pcp/tasks/collector.yml @@ -23,7 +23,7 @@ when: ansible_pkg_mgr == "dnf" -- include_tasks: permissons.yml +- import_tasks: permissons.yml - name: Restart pcp service: diff --git a/roles/pcp/tasks/main.yml b/roles/pcp/tasks/main.yml index 3c1d808..2fe17fd 100644 --- a/roles/pcp/tasks/main.yml +++ b/roles/pcp/tasks/main.yml @@ -5,34 +5,34 @@ - always - name: Set up upstream repo - include_tasks: repo.yml + import_tasks: repo.yml when: upstream_repo|bool == true tags: - repo -- include_tasks: apt_update.yml +- import_tasks: apt_update.yml when: upstream_repo|bool == false tags: - always - name: Set up as collector - include_tasks: collector.yml + import_tasks: collector.yml when: pcp_collector|bool == true tags: - collector - name: Set up as manager - include_tasks: manager.yml + import_tasks: manager.yml when: pcp_manager|bool == true tags: - manager - name: Set up web UI - include_tasks: web.yml + import_tasks: web.yml when: pcp_web|bool == true tags: diff --git a/roles/pcp/tasks/manager.yml b/roles/pcp/tasks/manager.yml index 888ff7c..b6e450b 100644 --- a/roles/pcp/tasks/manager.yml +++ b/roles/pcp/tasks/manager.yml @@ -72,7 +72,7 @@ mode: 0644 register: target_discovery -- include_tasks: permissons.yml +- import_tasks: permissons.yml # This greatly speeds up polling for hosts - name: Set PMCD_CONNECT_TIMEOUT in pmmgr.options diff --git a/roles/pcp/tasks/repo.yml b/roles/pcp/tasks/repo.yml index 9f51e7f..1129751 100644 --- a/roles/pcp/tasks/repo.yml +++ b/roles/pcp/tasks/repo.yml @@ -30,7 +30,7 @@ when: ansible_pkg_mgr == "yum" -- include_tasks: apt_update.yml +- import_tasks: apt_update.yml - name: Ensure packages are updated (apt) shell: "DEBIAN_FRONTEND=noninteractive apt -y install --only-upgrade .*pcp.*" diff --git a/roles/public_facing/tasks/download.ceph.com.yml b/roles/public_facing/tasks/download.ceph.com.yml index ae44752..a00d00d 100644 --- a/roles/public_facing/tasks/download.ceph.com.yml +++ b/roles/public_facing/tasks/download.ceph.com.yml @@ -68,4 +68,4 @@ minute: "0" job: "/usr/libexec/make_timestamp" -- include_tasks: letsencrypt_nginx.yml +- import_tasks: letsencrypt_nginx.yml diff --git a/roles/public_facing/tasks/main.yml b/roles/public_facing/tasks/main.yml index 17a9028..67639a9 100644 --- a/roles/public_facing/tasks/main.yml +++ b/roles/public_facing/tasks/main.yml @@ -3,12 +3,12 @@ # Most of our public-facing hosts are running Ubuntu. # use_ufw defaults to false but is overridden in inventory host_vars -- include_tasks: ufw.yml +- import_tasks: ufw.yml when: use_ufw == true tags: - always -- include_tasks: fail2ban.yml +- import_tasks: fail2ban.yml tags: - always when: use_fail2ban == true diff --git a/roles/public_facing/tasks/www.ceph.com.yml b/roles/public_facing/tasks/www.ceph.com.yml index fd9cf8d..6199004 100644 --- a/roles/public_facing/tasks/www.ceph.com.yml +++ b/roles/public_facing/tasks/www.ceph.com.yml @@ -9,4 +9,4 @@ minute: "*/5" job: "/usr/bin/wget -q -O - http://ceph.com/wp-cron.php?doing_wp_cron" -- include_tasks: letsencrypt_nginx.yml +- import_tasks: letsencrypt_nginx.yml diff --git a/roles/puddle/tasks/main.yml b/roles/puddle/tasks/main.yml index e4cd44a..df7f130 100644 --- a/roles/puddle/tasks/main.yml +++ b/roles/puddle/tasks/main.yml @@ -4,33 +4,33 @@ when: ansible_distribution != 'RedHat' # install puddle -- include_tasks: install.yml +- import_tasks: install.yml tags: - install-puddle # configure NFS -- include_tasks: nfs.yml +- import_tasks: nfs.yml # configure puddle -- include_tasks: configure.yml +- import_tasks: configure.yml tags: - configure-puddle # install and configure web server -- include_tasks: nginx.yml +- import_tasks: nginx.yml tags: - nginx # install and configure distill -- include_tasks: distill/install.yml +- import_tasks: distill/install.yml tags: - install-distill -- include_tasks: distill/configure.yml +- import_tasks: distill/configure.yml tags: - configure-distill # install and configure rsyncd -- include_tasks: rsync.yml +- import_tasks: rsync.yml tags: - rsync diff --git a/roles/pulpito/tasks/main.yml b/roles/pulpito/tasks/main.yml index 7da3b60..d890fe6 100644 --- a/roles/pulpito/tasks/main.yml +++ b/roles/pulpito/tasks/main.yml @@ -4,10 +4,10 @@ tags: - always -- include_tasks: yum_systems.yml +- import_tasks: yum_systems.yml when: ansible_pkg_mgr == "yum" -- include_tasks: apt_systems.yml +- import_tasks: apt_systems.yml when: ansible_pkg_mgr == "apt" - name: Create the user diff --git a/roles/testnode/tasks/apt_systems.yml b/roles/testnode/tasks/apt_systems.yml index a1c6dc6..0a9d229 100644 --- a/roles/testnode/tasks/apt_systems.yml +++ b/roles/testnode/tasks/apt_systems.yml @@ -1,6 +1,6 @@ --- - name: Setup local repo files. - include_tasks: apt/repos.yml + import_tasks: apt/repos.yml tags: - repos @@ -22,7 +22,7 @@ - packages - name: Perform package related tasks. - include_tasks: apt/packages.yml + import_tasks: apt/packages.yml tags: - packages @@ -67,7 +67,7 @@ groups: fuse,kvm,disk append: yes -- include_tasks: static_ip.yml +- import_tasks: static_ip.yml when: "'vps' not in group_names" - name: Stop apache2 diff --git a/roles/testnode/tasks/lvm.yml b/roles/testnode/tasks/lvm.yml index ba22d6b..9767bbc 100644 --- a/roles/testnode/tasks/lvm.yml +++ b/roles/testnode/tasks/lvm.yml @@ -7,7 +7,7 @@ backrefs: yes state: present -- include_tasks: configure_lvm.yml +- import_tasks: configure_lvm.yml when: (logical_volumes is defined) or (volume_groups is defined) or (quick_lvs_to_create is defined) diff --git a/roles/testnode/tasks/main.yml b/roles/testnode/tasks/main.yml index 0645700..0992146 100644 --- a/roles/testnode/tasks/main.yml +++ b/roles/testnode/tasks/main.yml @@ -1,11 +1,11 @@ --- # loading vars -- include_tasks: vars.yml +- import_tasks: vars.yml tags: - vars - always -- include_tasks: user.yml +- import_tasks: user.yml tags: - user @@ -19,92 +19,92 @@ when: ansible_pkg_mgr != "zypper" - name: Set the hostname - include_tasks: set_hostname.yml + import_tasks: set_hostname.yml when: lab_domain != "" tags: - hostname - name: configure ssh - include_tasks: ssh.yml + import_tasks: ssh.yml tags: - ssh - name: configure things specific to yum systems - include_tasks: yum_systems.yml + import_tasks: yum_systems.yml when: ansible_pkg_mgr == "yum" - name: configure things specific to apt systems - include_tasks: apt_systems.yml + import_tasks: apt_systems.yml when: ansible_pkg_mgr == "apt" - name: configure things specific to zypper systems - include_tasks: zypper_systems.yml + import_tasks: zypper_systems.yml when: ansible_pkg_mgr == "zypper" - name: configure centos specific things - include_tasks: setup-centos.yml + import_tasks: setup-centos.yml when: ansible_distribution == "CentOS" - name: configure red hat specific things - include_tasks: setup-redhat.yml + import_tasks: setup-redhat.yml when: ansible_distribution == 'RedHat' - name: configure fedora specific things - include_tasks: setup-fedora.yml + import_tasks: setup-fedora.yml when: ansible_distribution == "Fedora" - name: configure ubuntu specific things - include_tasks: setup-ubuntu.yml + import_tasks: setup-ubuntu.yml when: ansible_distribution == "Ubuntu" - name: configure ubuntu non-aarch64 specific things - include_tasks: setup-ubuntu-non-aarch64.yml + import_tasks: setup-ubuntu-non-aarch64.yml when: ansible_distribution == "Ubuntu" and ansible_architecture != "aarch64" - name: configure debian specific things - include_tasks: setup-debian.yml + import_tasks: setup-debian.yml when: ansible_distribution == "Debian" -- include_tasks: zap_disks.yml +- import_tasks: zap_disks.yml tags: - zap - name: partition drives, if any are requested - include_tasks: drive_partitioning.yml + import_tasks: drive_partitioning.yml when: drives_to_partition is defined tags: - partition - name: set up LVM - include_tasks: lvm.yml + import_tasks: lvm.yml tags: - lvm - name: mount /var/lib/ceph to specified partition - include_tasks: var_lib.yml + import_tasks: var_lib.yml when: var_lib_partition is defined tags: - varlib # Install and configure cpan and Amazon::S3 -- include_tasks: cpan.yml +- import_tasks: cpan.yml tags: - cpan # configure ntp -- include_tasks: ntp.yml +- import_tasks: ntp.yml tags: - ntp-client - name: configure pip to use our mirror - include_tasks: pip.yml + import_tasks: pip.yml tags: - pip - name: include resolv.conf setup - include_tasks: resolvconf.yml + import_tasks: resolvconf.yml tags: - resolvconf diff --git a/roles/testnode/tasks/redhat/rhel_6.yml b/roles/testnode/tasks/redhat/rhel_6.yml index b306524..92353c5 100644 --- a/roles/testnode/tasks/redhat/rhel_6.yml +++ b/roles/testnode/tasks/redhat/rhel_6.yml @@ -1,5 +1,5 @@ --- - name: Fix broken cloud-init - include_tasks: ../cloud-init.yml + import_tasks: ../cloud-init.yml -- include_tasks: ../imitate_ubuntu.yml +- import_tasks: ../imitate_ubuntu.yml diff --git a/roles/testnode/tasks/redhat/rhel_7.yml b/roles/testnode/tasks/redhat/rhel_7.yml index d9fdfa8..262ec0c 100644 --- a/roles/testnode/tasks/redhat/rhel_7.yml +++ b/roles/testnode/tasks/redhat/rhel_7.yml @@ -1,4 +1,4 @@ --- -- include_tasks: ../nfs.yml +- import_tasks: ../nfs.yml tags: - nfs diff --git a/roles/testnode/tasks/setup-centos.yml b/roles/testnode/tasks/setup-centos.yml index 319db0c..f0140a2 100644 --- a/roles/testnode/tasks/setup-centos.yml +++ b/roles/testnode/tasks/setup-centos.yml @@ -1,6 +1,6 @@ --- - name: Fix broken cloud-init - include_tasks: cloud-init.yml + import_tasks: cloud-init.yml when: ansible_distribution_major_version == "6" -- include_tasks: imitate_ubuntu.yml +- import_tasks: imitate_ubuntu.yml diff --git a/roles/testnode/tasks/setup-fedora.yml b/roles/testnode/tasks/setup-fedora.yml index 89dacaf..b35caf3 100644 --- a/roles/testnode/tasks/setup-fedora.yml +++ b/roles/testnode/tasks/setup-fedora.yml @@ -1,5 +1,5 @@ --- -- include_tasks: imitate_ubuntu.yml +- import_tasks: imitate_ubuntu.yml - name: Set grub config. template: diff --git a/roles/testnode/tasks/setup-redhat.yml b/roles/testnode/tasks/setup-redhat.yml index 7e9047e..e853612 100644 --- a/roles/testnode/tasks/setup-redhat.yml +++ b/roles/testnode/tasks/setup-redhat.yml @@ -1,8 +1,8 @@ --- - name: Include rhel 7.x specific tasks. - include_tasks: redhat/rhel_7.yml + import_tasks: redhat/rhel_7.yml when: ansible_distribution_major_version == "7" - name: Include rhel 6.x specific tasks. - include_tasks: redhat/rhel_6.yml + import_tasks: redhat/rhel_6.yml when: ansible_distribution_major_version == "6" diff --git a/roles/testnode/tasks/setup-ubuntu.yml b/roles/testnode/tasks/setup-ubuntu.yml index 61e4d6b..5c95336 100644 --- a/roles/testnode/tasks/setup-ubuntu.yml +++ b/roles/testnode/tasks/setup-ubuntu.yml @@ -4,6 +4,6 @@ path: /etc/ceph state: absent -- include_tasks: nfs.yml +- import_tasks: nfs.yml tags: - nfs diff --git a/roles/testnode/tasks/yum/repos.yml b/roles/testnode/tasks/yum/repos.yml index 3465a3e..3e9a25b 100644 --- a/roles/testnode/tasks/yum/repos.yml +++ b/roles/testnode/tasks/yum/repos.yml @@ -21,7 +21,7 @@ with_dict: "{{ yum_repos }}" when: yum_repos.keys() | length > 0 -- include_tasks: gpg_keys.yml +- import_tasks: gpg_keys.yml when: ansible_distribution == "Fedora" tags: - gpg-keys diff --git a/roles/testnode/tasks/yum_systems.yml b/roles/testnode/tasks/yum_systems.yml index 3976aa7..4c18bd5 100644 --- a/roles/testnode/tasks/yum_systems.yml +++ b/roles/testnode/tasks/yum_systems.yml @@ -55,17 +55,17 @@ rpm --rebuilddb - name: Setup local repo files. - include_tasks: yum/repos.yml + import_tasks: yum/repos.yml tags: - repos - name: Perform package related tasks. - include_tasks: yum/packages.yml + import_tasks: yum/packages.yml tags: - packages - name: Disable firewall - include_tasks: yum/firewall.yml + import_tasks: yum/firewall.yml - name: Enable SELinux selinux: state=permissive policy=targeted diff --git a/roles/testnode/tasks/zypper_systems.yml b/roles/testnode/tasks/zypper_systems.yml index a735256..9e10933 100644 --- a/roles/testnode/tasks/zypper_systems.yml +++ b/roles/testnode/tasks/zypper_systems.yml @@ -47,7 +47,7 @@ rpm --rebuilddb - name: Perform package related tasks. - include_tasks: zypper/packages.yml + import_tasks: zypper/packages.yml tags: - packages diff --git a/roles/teuthology/tasks/main.yml b/roles/teuthology/tasks/main.yml index 32fb26c..c074743 100644 --- a/roles/teuthology/tasks/main.yml +++ b/roles/teuthology/tasks/main.yml @@ -1,13 +1,13 @@ --- -- include_tasks: apt_systems.yml +- import_tasks: apt_systems.yml when: ansible_pkg_mgr == "apt" # Yum systems support is not implemented yet. -- include_tasks: yum_systems.yml +- import_tasks: yum_systems.yml when: ansible_pkg_mgr == "yum" # Set up the different users that teuthology uses -- include_tasks: setup_users.yml +- import_tasks: setup_users.yml - name: Ship /etc/teuthology.yaml template: @@ -18,6 +18,6 @@ - config # Serve logs over HTTP -- include_tasks: setup_log_access.yml +- import_tasks: setup_log_access.yml tags: - logs diff --git a/roles/users/tasks/main.yml b/roles/users/tasks/main.yml index f0806b7..66cef4c 100644 --- a/roles/users/tasks/main.yml +++ b/roles/users/tasks/main.yml @@ -1,17 +1,17 @@ --- -- include_tasks: filter_users.yml +- import_tasks: filter_users.yml tags: - always -- include_tasks: create_users.yml +- import_tasks: create_users.yml tags: - user -- include_tasks: update_keys.yml +- import_tasks: update_keys.yml tags: - pubkeys -- include_tasks: revoke_users.yml +- import_tasks: revoke_users.yml tags: - user - revoke diff --git a/roles/vmhost/tasks/main.yml b/roles/vmhost/tasks/main.yml index 778e6ca..07109c2 100644 --- a/roles/vmhost/tasks/main.yml +++ b/roles/vmhost/tasks/main.yml @@ -1,8 +1,8 @@ -- include_tasks: packages.yml +- import_tasks: packages.yml tags: packages -- include_tasks: networking.yml +- import_tasks: networking.yml tags: networking -- include_tasks: libvirt.yml +- import_tasks: libvirt.yml tags: libvirt