Release v0.3.0 - Integrate auto-detection into mdadm_arrays configuration
Summary
This version introduces a major refactoring of the RAID disk auto-detection system. The previous approach using separate variables has been replaced with direct integration into the mdadm_arrays
structure.
New Features
Integrated Configuration
- New
auto_detect
field: Enables auto-detection per array - New
min_disks
field: Defines minimum number of disks required for auto-detection - Unified configuration: Everything is now configured within
mdadm_arrays
Enhanced Validation
- Conflict detection: Error if
auto_detect=true
ANDdevices
are defined - Resource validation: Error if insufficient disks are available
- Explicit error messages: Improved debugging of configurations
Breaking Changes
Removed Variables
mdadm_auto_detect_arrays
: Removedmdadm_auto_detect_config
: Removed
New Syntax
Previous configuration (v0.2.0):
mdadm_auto_detect_arrays: true
mdadm_auto_detect_config:
- name: md200
filesystem: lvm
level: 5
state: present
min_disks: 3
New configuration (v0.3.0):
mdadm_arrays:
- name: md200
devices: [] # empty list for auto-detection
filesystem: lvm
level: 5
state: present
auto_detect: true
min_disks: 3
Usage Examples
Manual Configuration
mdadm_arrays:
- name: md0
devices:
- /dev/sdb
- /dev/sdc
filesystem: ext4
level: 1
state: present
auto_detect: false # default
Auto-detection Configuration
mdadm_arrays:
- name: md200
devices: []
filesystem: lvm
level: 5
state: present
auto_detect: true
min_disks: 3
Mixed Configuration
mdadm_arrays:
- name: md0 # Manual configuration
devices:
- /dev/sdb
- /dev/sdc
filesystem: ext4
level: 1
state: present
- name: md200 # Auto-detection
devices: []
filesystem: lvm
level: 5
state: present
auto_detect: true
min_disks: 3
Technical Improvements
- Validation logic: Strict configuration checks
- Error handling: Explicit messages for troubleshooting
- Performance: Auto-detection triggered only when needed
- Flexibility: Mix manual and auto-detection configurations
Documentation
- README.md updated with new examples
- defaults/main.yml documented with complete examples
- Migration examples provided for easier transition
Migration from v0.2.0
- Remove
mdadm_auto_detect_arrays
andmdadm_auto_detect_config
variables - Add arrays with
auto_detect: true
tomdadm_arrays
- Set
devices: []
for arrays with auto-detection - Specify
min_disks
if needed (default: 3)
Contributors
- @rguichard - Design and implementation
Important: This version contains breaking changes. Please review the migration guide above before updating.