diff --git a/ansible/roles/rad_setup_instructlab/files/firefox-rad.desktop b/ansible/roles/rad_setup_instructlab/files/rad.desktop similarity index 91% rename from ansible/roles/rad_setup_instructlab/files/firefox-rad.desktop rename to ansible/roles/rad_setup_instructlab/files/rad.desktop index d9e989c8b02..efdd56077bd 100644 --- a/ansible/roles/rad_setup_instructlab/files/firefox-rad.desktop +++ b/ansible/roles/rad_setup_instructlab/files/rad.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Version=1.0 -Name=RAD AI Labs +Name=Lab Guides Comment=Opens Firefox with a specific URL Exec=firefox localhost:8443 Icon=/home/insturct/rad_lab.png diff --git a/ansible/roles/rad_setup_instructlab/tasks/50-dev-tools-setup.yml b/ansible/roles/rad_setup_instructlab/tasks/50-dev-tools-setup.yml index 528ef60c9f6..8e763d4c48c 100644 --- a/ansible/roles/rad_setup_instructlab/tasks/50-dev-tools-setup.yml +++ b/ansible/roles/rad_setup_instructlab/tasks/50-dev-tools-setup.yml @@ -2,6 +2,33 @@ - name: Setup dev tools block: + - name: Add a custom shortcut icon + ansible.builtin.copy: + src: rad_lab.png + dest: "/home/{{ setup_instructlab_user }}/" + mode: u=rw,g=rw,o= + + - name: Add a firefox shortcut for the lab instructions + ansible.builtin.copy: + src: rad.desktop + dest: "/usr/share/applications/" + mode: u=rw,g=r,o=r + become: true + become_user: root + + - name: Update the desktop database to make the new shortcut visible + shell: "sudo gtk-update-icon-cache -f -t /usr/share/icons/hicolor" + + - name: Reboot the server + reboot: + connect_timeout: 60 + post_reboot_delay: 30 + reboot_timeout: 180 + async: 1 + poll: 0 + become: true + become_user: root + - name: Download VS Code ansible.builtin.get_url: url: https://code.visualstudio.com/sha/download?build=stable&os=linux-rpm-x64 @@ -15,15 +42,6 @@ curl -s "https://get.sdkman.io" | bash source "$HOME/.sdkman/bin/sdkman-init.sh" - # - name: Install Java - # shell: sdk install java 21.0.5-tem - - # - name: Create config file - # ansible.builtin.copy: - # src: config.yaml - # dest: "/home/{{ setup_instructlab_user }}/instructlab/config.yaml" - # mode: u=rw,g=rw,o= - - name: iLab setup shell: | cd /home/{{ setup_instructlab_user }}/instructlab @@ -89,13 +107,6 @@ recurse: true mode: 0755 - # - name: Build the parasol app - # shell: | - # cd /home/{{ setup_instructlab_user }}/parasol-insurance/app/ && ./mvnw clean package -DskipTests - - # - name: Run the parasol app in background - # shell: "nohup java -jar -Dquarkus.langchain4j.openai.parasol-chat.base-url=http://localhost:8000/v1 /home/{{ setup_instructlab_user }}/parasol-insurance/app/target/quarkus-app/quarkus-run.jar > ~/quarkus.out 2>&1 &" - - name: Create settings directory for VS Code file: path: "/home/{{ setup_instructlab_user }}/.config/Code/User" @@ -134,30 +145,5 @@ - name: Build and start the lab instructions for Desktop labs shell: "sh /home/{{ setup_instructlab_user }}/dev-guides/utilities/lab-desktop-start" - - name: Add a custom shortcut icon - ansible.builtin.copy: - src: rad_lab.png - dest: "/home/{{ setup_instructlab_user }}/" - mode: u=rw,g=rw,o= - - - name: Add a firefox shortcut for the lab instructions - ansible.builtin.copy: - src: firefox-rad.desktop - dest: "/home/{{ setup_instructlab_user }}/.local/share/applications/firefox-rad.desktop" - mode: u=rw,g=rw,o= - - - name: Update the desktop database to make the new shortcut visible - shell: "sudo gtk-update-icon-cache -f -t /usr/share/icons/hicolor" - - - name: Reboot the server - reboot: - connect_timeout: 60 - post_reboot_delay: 30 - reboot_timeout: 180 - async: 1 - poll: 0 - become: true - become_user: root - become: true become_user: "{{ setup_instructlab_user }}"