fix raid
This commit is contained in:
@@ -37,24 +37,40 @@
|
|||||||
- name: Read /proc/mdstat from VM (via SSH) # English comments
|
- name: Read /proc/mdstat from VM (via SSH) # English comments
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
argv:
|
argv:
|
||||||
|
- timeout
|
||||||
|
- 25s
|
||||||
- sshpass
|
- sshpass
|
||||||
- -e
|
- -e
|
||||||
- ssh
|
- ssh
|
||||||
- -o
|
- -o
|
||||||
- StrictHostKeyChecking=no
|
- StrictHostKeyChecking=no
|
||||||
- -o
|
- -o
|
||||||
- ConnectTimeout=15
|
- UserKnownHostsFile=/dev/null
|
||||||
|
- -o
|
||||||
|
- ConnectTimeout=10
|
||||||
|
- -o
|
||||||
|
- ConnectionAttempts=1
|
||||||
|
- -o
|
||||||
|
- NumberOfPasswordPrompts=1
|
||||||
|
- -o
|
||||||
|
- PubkeyAuthentication=no
|
||||||
|
- -o
|
||||||
|
- GSSAPIAuthentication=no
|
||||||
|
- -o
|
||||||
|
- PasswordAuthentication=yes
|
||||||
|
- -o
|
||||||
|
- ServerAliveInterval=5
|
||||||
|
- -o
|
||||||
|
- ServerAliveCountMax=2
|
||||||
- "{{ vm_user }}@{{ vm_ip }}"
|
- "{{ vm_user }}@{{ vm_ip }}"
|
||||||
- bash
|
- "cat /proc/mdstat"
|
||||||
- -lc
|
|
||||||
- "{{ ('sudo ' if use_sudo else '') + 'cat /proc/mdstat' }}"
|
|
||||||
environment:
|
environment:
|
||||||
SSHPASS: "{{ vm_pass }}"
|
SSHPASS: "{{ vm_pass }}"
|
||||||
register: mdstat_cmd
|
register: mdstat_cmd
|
||||||
changed_when: false
|
changed_when: false
|
||||||
failed_when: false
|
failed_when: false
|
||||||
no_log: "{{ DEBUG == 0 }}" # hides stdout/stderr in normal mode, but asserts below will still report summary
|
no_log: "{{ DEBUG == 0 }}"
|
||||||
|
|
||||||
- name: Fail if we cannot read /proc/mdstat (SSH/auth/network) # English comments
|
- name: Fail if we cannot read /proc/mdstat (SSH/auth/network) # English comments
|
||||||
ansible.builtin.assert:
|
ansible.builtin.assert:
|
||||||
that:
|
that:
|
||||||
|
|||||||
Reference in New Issue
Block a user