fix the mount test

Signed-off-by: Adam Miller <admiller@redhat.com>
This commit is contained in:
Adam Miller 2023-12-05 15:28:23 -06:00
parent 9300f2ef60
commit d1adc3dbbd

View file

@ -177,7 +177,7 @@
- name: Try to create fstab record for the second swap file again
ansible.posix.mount:
name: none
src: /tmp/swap1
src: /tmp/swap2
opts: sw
fstype: swap
state: present
@ -587,8 +587,9 @@
register: fstab_stat_after_mount
- name: Get mountinfo
ansible.builtin.command: grep '^/tmp/myfs$' /etc/mtab -c
ansible.builtin.command: grep -c '/tmp/myfs' /etc/mtab
register: check_mountinfo
failed_when: false
changed_when: false
- name: Assert the mount occured and the fstab is unchanged
@ -618,7 +619,8 @@
changed_when: false
- name: Get mountinfo
ansible.builtin.command: grep '^/tmp/myfs$' /etc/mtab -c
ansible.builtin.command: grep -c '/tmp/myfs' /etc/mtab
failed_when: false
register: check_mountinfo
changed_when: false
@ -645,7 +647,8 @@
changed_when: false
- name: Get mountinfo
ansible.builtin.command: grep '^/tmp/myfs$' /etc/mtab -c
ansible.builtin.command: grep -c '/tmp/myfs' /etc/mtab
failed_when: false
register: check_mountinfo
changed_when: false
@ -673,8 +676,9 @@
register: fstab_stat_after_unmount
- name: Get mountinfo
ansible.builtin.command: grep '^/tmp/myfs$' /etc/mtab -c
ansible.builtin.command: grep -c '/tmp/myfs' /etc/mtab
register: check_mountinfo
failed_when: false
changed_when: false
- name: Try to stat our test file