Skip to content

Commit

Permalink
/dev/data/test1 is already used as /dev/data/test1
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-de-bock committed Nov 6, 2023
1 parent f553599 commit 418ce3f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ The machine needs to be prepared. In CI this is done using [`molecule/default/pr
hosts: all
become: yes
gather_facts: no
serial: 30%

roles:
- role: robertdebock.bootstrap
Expand All @@ -88,7 +87,7 @@ The machine needs to be prepared. In CI this is done using [`molecule/default/pr
state: absent
force: yes

- name: Remove loop_device
- name: Remove all loop devices
ansible.builtin.command:
cmd: losetup -D
changed_when: yes
Expand All @@ -99,15 +98,15 @@ The machine needs to be prepared. In CI this is done using [`molecule/default/pr
when:
- ansible_distribution == "Alpine"
block:
- name: Find loop devics
- name: Find loop devices
ansible.builtin.command:
cmd: losetup -a
register: loop_devices
changed_when: no

- name: Remove loop device
ansible.builtin.command:
cmd: "losetup -d {{ item | split(':')[0] }}"
cmd: "losetup -d {{ item | split(':') | first }}"
changed_when: yes
loop: "{{ loop_devices.stdout_lines }}"

Expand All @@ -123,7 +122,7 @@ The machine needs to be prepared. In CI this is done using [`molecule/default/pr

- name: Find first unused loop device
ansible.builtin.command:
cmd losetup -f
cmd: losetup -f
register: loop_device
changed_when: no

Expand Down
2 changes: 2 additions & 0 deletions tasks/filesystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
community.general.filesystem:
dev: "{{ filesystem.name }}"
fstype: "{{ filesystem.fstype | default(storage_default_fstype) }}"
when:
- ansible_os_family != 'Alpine'
notify:
- Reload systemd

Expand Down

0 comments on commit 418ce3f

Please sign in to comment.