Switch filesystem mount test from btrfs to ext4

BTRFS is not available on centos-8 so switch the test to ext4 instead.

Change-Id: I9bcbbe4dd2ed94f2c6db1af5f927e68f079c8a7a
This commit is contained in:
Jonathan Rosser 2020-09-28 10:33:46 +01:00
parent 720524c5cd
commit 229c94c620
2 changed files with 4 additions and 14 deletions

View File

@ -13,17 +13,12 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
- name: Configure BTRFS sparse file - name: Configure ext4 sparse file
hosts: localhost hosts: localhost
user: root user: root
become: true become: true
connection: local connection: local
tasks: tasks:
- name: Install BTRFS packages
package:
name: "{{ btrfs_package[ansible_pkg_mgr | lower] }}"
state: present
- name: Create base directories - name: Create base directories
file: file:
path: "/var/lib" path: "/var/lib"
@ -37,12 +32,7 @@
- name: Format the sparse file - name: Format the sparse file
filesystem: filesystem:
fstype: btrfs fstype: ext4
dev: /var/lib/sparse-file.img dev: /var/lib/sparse-file.img
when: when:
- sparse_file is changed - sparse_file is changed
vars:
btrfs_package:
apt: "btrfs-tools"
yum: "btrfs-progs"
zypper: "btrfsprogs"

View File

@ -18,7 +18,7 @@
- import_playbook: test-create-nfs-dev.yml - import_playbook: test-create-nfs-dev.yml
- import_playbook: test-create-btrfs-dev.yml - import_playbook: test-create-ext4-dev.yml
- name: Playbook for role testing - name: Playbook for role testing
hosts: localhost hosts: localhost
@ -46,7 +46,7 @@
systemd_mounts: systemd_mounts:
- what: '/var/lib/sparse-file.img' - what: '/var/lib/sparse-file.img'
where: '/var/lib/sparse-file' where: '/var/lib/sparse-file'
type: 'btrfs' type: 'ext4'
options: 'loop' options: 'loop'
state: 'started' state: 'started'
enabled: true enabled: true