community.general/tests/integration/targets/zpool/tasks/main.yml
Tom Hesse 928622703d
New module zpool (#10146)
* Add zpool module

* Add botmeta

* Use str.format instead of f-strings

* Remove nonlocal usage

* Add check to only pass ashift to zpool add

* Extend ansible_spec and remove unnecessary validation

* Apply suggestions and fix style

* Fix indentation of yaml lists

* Add method to normalize vdevs

Fix role: none in vdevs

* Use CmdRunner instead of run_command

* Fix styling and documentation

* Use str.format instead of f-strings

* Make sure vdevs are only required when state is present

* Add support for loop devices and normalize vdev type

* Add integration tests

* Add missing test dependencies for alpine and redhat

* Skip integration tests on rhel10 until there there packages available

* Use package module for better auto detection of package manager on rhel

* Add copyright header

* Skip tests on rhel and remove redhat install requirements

* Ensure loop devices under /dev exist

* Enable usage of files as pool devices

* Remove disk setup

* Use files as disks

* Apply suggestions

* Fix argument_spec
2025-06-07 17:52:01 +02:00

25 lines
935 B
YAML

---
# Copyright (c) 2025, Tom Hesse <contact@tomhesse.xyz>
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
# SPDX-License-Identifier: GPL-3.0-or-later
- name: Execute integration tests
become: true
block:
- name: Ensure disk files exists
ansible.builtin.command:
cmd: "dd if=/dev/zero of={{ item }} bs=1M count=256 conv=fsync"
creates: "{{ item }}"
loop: "{{ zpool_disk_configs }}"
- name: Include distribution specific install_requirements.yml
ansible.builtin.include_tasks: install_requirements_{{ ansible_distribution | lower }}.yml
- name: Include create_destroy.yml
ansible.builtin.include_tasks: create_destroy.yml
- name: Include add_remove_vdevs.yml
ansible.builtin.include_tasks: add_remove_vdevs.yml
- name: Include properties.yml
ansible.builtin.include_tasks: properties.yml