---
-- include_tasks: ipmi_secrets.yml
+- import_tasks: ipmi_secrets.yml
tags:
- always
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
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
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
---
- 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"
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')
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
((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
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
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
---
-- include_tasks: import_distro.yml
+- import_tasks: import_distro.yml
tags:
- distros
---
-- include_tasks: populate_systems.yml
+- import_tasks: populate_systems.yml
tags:
- systems
- 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
- 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:
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
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
- entitlements
# create and manage epel.repo
-- include_tasks: epel.yml
+- import_tasks: epel.yml
when:
ansible_distribution == "CentOS" or
ansible_distribution == 'RedHat'
---
- 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 }}"
- 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 }}"
# 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
# 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
---
-- 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 }}"
(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
---
-- 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"'
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
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
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
- 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
mode: 0755
# Manage OpenVPN users list using secrets repo
-- include_tasks: users.yml
+- import_tasks: users.yml
tags:
- users
- always
# Install and update system packages
-- include_tasks: packages.yml
+- import_tasks: packages.yml
tags:
- packages
- 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
---
- debug: msg="Performing cleanup related tasks..."
-- include_tasks: packages.yml
+- import_tasks: packages.yml
vars:
state: "absent"
# 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
# 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
---
-- include_tasks: packages.yml
+- import_tasks: packages.yml
vars:
state: "present"
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
when:
ansible_pkg_mgr == "dnf"
-- include_tasks: permissons.yml
+- import_tasks: permissons.yml
- name: Restart pcp
service:
- 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:
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
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.*"
minute: "0"
job: "/usr/libexec/make_timestamp"
-- include_tasks: letsencrypt_nginx.yml
+- import_tasks: letsencrypt_nginx.yml
# 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
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
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
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
---
- name: Setup local repo files.
- include_tasks: apt/repos.yml
+ import_tasks: apt/repos.yml
tags:
- repos
- packages
- name: Perform package related tasks.
- include_tasks: apt/packages.yml
+ import_tasks: apt/packages.yml
tags:
- packages
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
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)
---
# loading vars
-- include_tasks: vars.yml
+- import_tasks: vars.yml
tags:
- vars
- always
-- include_tasks: user.yml
+- import_tasks: user.yml
tags:
- user
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
---
- 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
---
-- include_tasks: ../nfs.yml
+- import_tasks: ../nfs.yml
tags:
- nfs
---
- 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
---
-- include_tasks: imitate_ubuntu.yml
+- import_tasks: imitate_ubuntu.yml
- name: Set grub config.
template:
---
- 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"
path: /etc/ceph
state: absent
-- include_tasks: nfs.yml
+- import_tasks: nfs.yml
tags:
- nfs
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
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
rpm --rebuilddb
- name: Perform package related tasks.
- include_tasks: zypper/packages.yml
+ import_tasks: zypper/packages.yml
tags:
- packages
---
-- 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:
- config
# Serve logs over HTTP
-- include_tasks: setup_log_access.yml
+- import_tasks: setup_log_access.yml
tags:
- logs
---
-- 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
-- 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