Skip to content

Commit

Permalink
update the directions
Browse files Browse the repository at this point in the history
  • Loading branch information
IPvSean committed Jan 17, 2025
1 parent 1e57742 commit e32597d
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 35 additions & 1 deletion roles/control_node_always/tasks/20_workshop_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
mode: '0644'
when: username in inventory_hostname

- name: Copy instructor inventory to student1
- name: Copy instructor inventory to student
ansible.builtin.copy:
src: "{{ output_dir }}/instructor_inventory.txt"
dest: /tmp/instructor-inventory
Expand All @@ -102,11 +102,25 @@
# register: podman_pull
# until: podman_pull is not failed
# retries: 5
- name: Clean up libpod directories (if needed)
become: true
ansible.builtin.file:
path: "{{ item }}"
state: absent
with_items:
- /tmp/storage-run-1001/libpod/tmp
- /tmp/storage-run-1001/containers

- name: Enable lingering for user 1001
become: true
command: "loginctl enable-linger 1001 {{ username }}"

- name: Attempt to pull the primary or backup execution environment
block:
# Try pulling the primary execution environment
- name: Pull primary execution environment
become: true
become_user: "{{ username }}"
containers.podman.podman_image:
name: "{{ lookup('vars', workshop_type + '_ee') }}"
register: primary_podman_pull
Expand All @@ -116,8 +130,28 @@
rescue:
# Pull the backup execution environment if primary fails
- name: Pull backup execution environment
become: true
become_user: "{{ username }}"
containers.podman.podman_image:
name: "{{ lookup('vars', workshop_type + '_ee_backup') }}"
register: backup_podman_pull
retries: 5
until: backup_podman_pull is not failed

- containers.podman.podman_tag:
image: "{{ lookup('vars', workshop_type + '_ee_backup') }}"
target_names:
- "{{ lookup('vars', workshop_type + '_ee') }}"

- name: Enable lingering for user 1001
become: true
command: "loginctl enable-linger 1001 {{ username }}"

- name: Clean up libpod directories (if needed)
become: true
ansible.builtin.file:
path: "{{ item }}"
state: absent
with_items:
- /tmp/storage-run-1001/libpod/tmp
- /tmp/storage-run-1001/containers

0 comments on commit e32597d

Please sign in to comment.