Skip to content

Commit bb66d2f

Browse files
rguichardclaude
andcommitted
docs: update README.md with new auto-detection configuration
- Remove references to deprecated mdadm_auto_detect_arrays - Update examples to use new auto_detect field in mdadm_arrays - Add mixed configuration example showing both manual and auto-detect - Clarify validation rules and error conditions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 77cec90 commit bb66d2f

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

README.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ None
1717

1818
## Example Playbook
1919

20-
### Manual configuration
20+
### Manual device configuration
2121
```yaml
2222
- hosts: all
2323
become: true
@@ -30,6 +30,7 @@ None
3030
filesystem: lvm
3131
level: 5
3232
state: present
33+
auto_detect: false # default, can be omitted
3334
roles:
3435
- role: ansible-mdadm
3536
```
@@ -39,18 +40,44 @@ None
3940
- hosts: all
4041
become: true
4142
vars:
42-
mdadm_auto_detect_arrays: true
43-
mdadm_auto_detect_config:
43+
mdadm_arrays:
44+
- name: md200
45+
devices: [] # empty list for auto-detection
46+
filesystem: lvm
47+
level: 5
48+
state: present
49+
auto_detect: true
50+
min_disks: 3 # minimum number of disks required
51+
roles:
52+
- role: ansible-mdadm
53+
```
54+
55+
### Mixed configuration
56+
```yaml
57+
- hosts: all
58+
become: true
59+
vars:
60+
mdadm_arrays:
61+
- name: md0
62+
devices:
63+
- /dev/sdb
64+
- /dev/sdc
65+
filesystem: ext4
66+
level: 1
67+
state: present
68+
auto_detect: false
4469
- name: md200
70+
devices: []
4571
filesystem: lvm
4672
level: 5
4773
state: present
74+
auto_detect: true
4875
min_disks: 3
4976
roles:
5077
- role: ansible-mdadm
5178
```
5279
53-
Note: Auto-detection will automatically use all unused disks (not mounted, not in RAID, not in LVM, not formatted) if `mdadm_arrays` is empty and `mdadm_auto_detect_arrays` is true.
80+
**Note**: Auto-detection will automatically use all unused disks (not mounted, not in RAID, not in LVM, not formatted) when `auto_detect: true` and `devices: []`. Setting both `auto_detect: true` and defining `devices` will result in an error.
5481

5582
## License
5683

0 commit comments

Comments
 (0)