mirror of
https://github.com/trailofbits/algo.git
synced 2025-04-26 11:12:48 +02:00
* PKI to tmpfs * Fixes - diskutil to full path - unmount and eject fixes * Umount fix * run diskutil info only on Darwin kernels * fix shell tasks
26 lines
795 B
YAML
26 lines
795 B
YAML
---
|
|
- name: Linux | Delete the PKI directory
|
|
file:
|
|
path: "/{{ facts.tmpfs_volume_path }}/{{ facts.tmpfs_volume_name }}/"
|
|
state: absent
|
|
when: facts.ansible_system == "Linux"
|
|
|
|
- block:
|
|
- name: MacOS | check fs the ramdisk exists
|
|
command: /usr/sbin/diskutil info "{{ facts.tmpfs_volume_name }}"
|
|
ignore_errors: true
|
|
changed_when: false
|
|
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: diskutil_info.rc == 0
|
|
register: result
|
|
until: result.rc == 0
|
|
retries: 5
|
|
delay: 3
|
|
when:
|
|
- facts.ansible_system == "Darwin"
|