mirror of
https://github.com/trailofbits/algo.git
synced 2025-08-10 14:53:32 +02:00
Fixes
- diskutil to full path - unmount and eject fixes
This commit is contained in:
parent
d4661a1aa0
commit
6ce16e8079
2 changed files with 19 additions and 5 deletions
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
- name: MacOS | mount a ram disk
|
- name: MacOS | mount a ram disk
|
||||||
shell:
|
shell:
|
||||||
diskutil info "/{{ tmpfs_volume_path }}/{{ tmpfs_volume_name }}/" ||
|
/usr/sbin/diskutil info "/{{ tmpfs_volume_path }}/{{ tmpfs_volume_name }}/" ||
|
||||||
diskutil erasevolume HFS+ "{{ tmpfs_volume_name }}" $(hdiutil attach -nomount ram://64000)
|
/usr/sbin/diskutil erasevolume HFS+ "{{ tmpfs_volume_name }}" $(hdiutil attach -nomount ram://64000)
|
||||||
args:
|
args:
|
||||||
creates: "/{{ tmpfs_volume_path }}/{{ tmpfs_volume_name }}"
|
creates: "/{{ tmpfs_volume_path }}/{{ tmpfs_volume_name }}"
|
||||||
|
|
|
@ -5,7 +5,21 @@
|
||||||
state: absent
|
state: absent
|
||||||
when: facts.ansible_system == "Linux"
|
when: facts.ansible_system == "Linux"
|
||||||
|
|
||||||
- name: MacOS | eject the ram disk
|
- name: MacOS | check fs the ramdisk exists
|
||||||
command: diskutil eject "/{{ facts.tmpfs_volume_path }}/{{ facts.tmpfs_volume_name }}/" || true
|
command: /usr/sbin/diskutil info AlgoVPN-test
|
||||||
|
ignore_errors: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when: facts.ansible_system == "Darwin"
|
register: diskutil_info
|
||||||
|
|
||||||
|
- name: MacOS | unmount and eject the ram disk
|
||||||
|
shell:
|
||||||
|
/usr/sbin/diskutil umount force "/{{ facts.tmpfs_volume_path }}/{{ facts.tmpfs_volume_name }}/" &&
|
||||||
|
/usr/sbin/diskutil eject "{{ facts.tmpfs_volume_name }}"
|
||||||
|
changed_when: false
|
||||||
|
when:
|
||||||
|
- facts.ansible_system == "Darwin"
|
||||||
|
- diskutil_info.rc == 0
|
||||||
|
register: result
|
||||||
|
until: result.rc == 0
|
||||||
|
retries: 5
|
||||||
|
delay: 3
|
||||||
|
|
Loading…
Add table
Reference in a new issue