mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-13 08:05:19 +01:00
fix the mount test
Signed-off-by: Adam Miller <admiller@redhat.com>
This commit is contained in:
parent
9300f2ef60
commit
d1adc3dbbd
1 changed files with 9 additions and 5 deletions
|
|
@ -177,7 +177,7 @@
|
||||||
- name: Try to create fstab record for the second swap file again
|
- name: Try to create fstab record for the second swap file again
|
||||||
ansible.posix.mount:
|
ansible.posix.mount:
|
||||||
name: none
|
name: none
|
||||||
src: /tmp/swap1
|
src: /tmp/swap2
|
||||||
opts: sw
|
opts: sw
|
||||||
fstype: swap
|
fstype: swap
|
||||||
state: present
|
state: present
|
||||||
|
|
@ -587,8 +587,9 @@
|
||||||
register: fstab_stat_after_mount
|
register: fstab_stat_after_mount
|
||||||
|
|
||||||
- name: Get mountinfo
|
- name: Get mountinfo
|
||||||
ansible.builtin.command: grep '^/tmp/myfs$' /etc/mtab -c
|
ansible.builtin.command: grep -c '/tmp/myfs' /etc/mtab
|
||||||
register: check_mountinfo
|
register: check_mountinfo
|
||||||
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Assert the mount occured and the fstab is unchanged
|
- name: Assert the mount occured and the fstab is unchanged
|
||||||
|
|
@ -618,7 +619,8 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Get mountinfo
|
- 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
|
register: check_mountinfo
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
|
|
@ -645,7 +647,8 @@
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Get mountinfo
|
- 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
|
register: check_mountinfo
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
|
|
@ -673,8 +676,9 @@
|
||||||
register: fstab_stat_after_unmount
|
register: fstab_stat_after_unmount
|
||||||
|
|
||||||
- name: Get mountinfo
|
- name: Get mountinfo
|
||||||
ansible.builtin.command: grep '^/tmp/myfs$' /etc/mtab -c
|
ansible.builtin.command: grep -c '/tmp/myfs' /etc/mtab
|
||||||
register: check_mountinfo
|
register: check_mountinfo
|
||||||
|
failed_when: false
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Try to stat our test file
|
- name: Try to stat our test file
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue