Skip to content
Snippets Groups Projects
Commit feb1a763 authored by jurgenhaas's avatar jurgenhaas
Browse files

Extends mdstat playbook and script to optionally repair other partitions as well

parent 897712d8
No related branches found
No related tags found
No related merge requests found
Pipeline #31229 passed
......@@ -11,19 +11,19 @@
become: yes
tasks:
- name: Write to action file
shell: echo 'repair' >/sys/block/md2/md/sync_action
shell: echo 'repair' >/sys/block/{{ partition }}/md/sync_action
- name: Wait for repair to complete
wait_for:
path: /sys/block/md2/md/sync_action
path: /sys/block/{{ partition }}/md/sync_action
search_regex: idle
delay: 60
sleep: 60
timeout: 18000
- name: Write to action file
shell: echo 'check' >/sys/block/md2/md/sync_action
shell: echo 'check' >/sys/block/{{ partition }}/md/sync_action
- name: Wait for check to complete
wait_for:
path: /sys/block/md2/md/sync_action
path: /sys/block/{{ partition }}/md/sync_action
search_regex: idle
delay: 60
sleep: 60
......
---
description: Run mdstat tasks
cli:
options:
- name: partition
default: md2
help: Which partition to repair
arguments:
playbook: mdstat
command:
- name: extra-vars
value: partition=%s
args:
- partition
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment