-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,39 @@ | ||
# workflow to redploy ML102 on the training environment | ||
# | ||
# 1. Get the list of all training/trainer home directories | ||
# 2. Delete any "ml102_workshop" directories in the homes | ||
# 3. Delete the ML102 apptainer image | ||
# 2. Remove any "ml102_workshop" directories in the homes | ||
# 3. Remove the ML102 apptainer image | ||
# 4. Pull the apptainer image | ||
# | ||
# Following this, any user that starts a new ML102 session | ||
# will get the version from the newly downloaded image | ||
# | ||
# Note: this doesn't redeploy the OOD ML102 app | ||
--- | ||
- name: Get list of home directories on ML102 node | ||
- name: Clean ML102 directories in homes | ||
become: yes | ||
hosts: webnode | ||
hosts: servicesnode | ||
tasks: | ||
- name: List home directories | ||
find: | ||
paths: /home/shared | ||
paths: /srv/homes | ||
file_type: directory | ||
recurse: no | ||
register: homes_find | ||
|
||
- debug: | ||
var: item.path | ||
- name: Remove any ML102 directories in homes | ||
ansible.builtin.file: | ||
path: "{{ item.path }}/ml102_workshop" | ||
state: absent | ||
with_items: "{{ homes_find.files }}" | ||
|
||
- name: Redeploy ML102 image | ||
become: yes | ||
hosts: webnode | ||
pre_tasks: | ||
- name: Remove the ML102 apptainer image | ||
ansible.builtin.file: | ||
path: /opt/ml102_workshop/ML102.sif | ||
state: absent | ||
roles: | ||
- ml102_workshop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters