3
0
forked from jakub/ansible
This commit is contained in:
martin.fencl
2025-12-23 20:16:51 +01:00
parent 3c7701a760
commit fd57e6b566

View File

@@ -37,24 +37,40 @@
- name: Read /proc/mdstat from VM (via SSH) # English comments
ansible.builtin.command:
argv:
- timeout
- 25s
- sshpass
- -e
- ssh
- -o
- StrictHostKeyChecking=no
- -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 }}"
- bash
- -lc
- "{{ ('sudo ' if use_sudo else '') + 'cat /proc/mdstat' }}"
- "cat /proc/mdstat"
environment:
SSHPASS: "{{ vm_pass }}"
register: mdstat_cmd
changed_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
ansible.builtin.assert:
that: