Skip to content

Commit

Permalink
Reorder the desktop icon task (#9003)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieloh30 authored Jan 18, 2025
1 parent 8331920 commit bbf2090
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
68 changes: 27 additions & 41 deletions ansible/roles/rad_setup_instructlab/tasks/50-dev-tools-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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 }}"

0 comments on commit bbf2090

Please sign in to comment.