Skip to content

Commit

Permalink
add reset rook
Browse files Browse the repository at this point in the history
  • Loading branch information
dfry authored and muzammil360 committed Jan 15, 2025
1 parent af91acb commit dbfccca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mojaloop/iac/roles/microk8s/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ teardown: false
microk8s_root_path: /var/snap/microk8s/
longhorn_data_path: /var/lib/longhorn/
rook_data_path: /var/lib/rook
rook_disk_vol: "/dev/sdb"
enable_rook_disk_reset: false
microk8s_apiserver_port: 16443
microk8s_dev_skip: false
dev_skip: false
Expand Down
8 changes: 8 additions & 0 deletions mojaloop/iac/roles/microk8s/tasks/remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,11 @@
ansible.builtin.file:
state: absent
path: "{{ rook_data_path }}"

- name: reset rook vol
become: true
shell: |
wipefs -a {{ rook_disk_vol }}
dd if=/dev/zero of="{{ rook_disk_vol }}" bs=1M count=100 oflag=direct,dsync
partprobe {{ rook_disk_vol }}
when: enable_rook_disk_reset | bool

0 comments on commit dbfccca

Please sign in to comment.