Skip to content

Commit

Permalink
Fix the git clone issue and add a new shortcut (#8975)
Browse files Browse the repository at this point in the history
  • Loading branch information
danieloh30 authored Jan 15, 2025
1 parent 0a6798f commit 01ce35c
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 7 deletions.
18 changes: 18 additions & 0 deletions ansible/roles/rad_setup_instructlab/files/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: modules
title: Red Hat AI Development Roadshow - Developer Track
version: main
nav:
- modules/ROOT/nav.adoc

asciidoc:
attributes:
lab_name: Red Hat AI Development Roadshow - Developer Track
user: user1
password: openshift
openshift_cluster_ingress_domain: app.example.sandbox.com
novnc_url: http://localhost:8443
release-version: main
page-pagination: true
page-toclevels: 1
experimental: ""
env-desktop: true
9 changes: 9 additions & 0 deletions ansible/roles/rad_setup_instructlab/files/firefox-rad.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Desktop Entry]
Version=1.0
Name=RAD AI Labs
Comment=Opens Firefox with a specific URL
Exec=firefox localhost:8443
Icon=/usr/share/icons/hicolor/48x48/apps/firefox.png
Terminal=false
Type=Application
Categories=Network;WebBrowser;
30 changes: 23 additions & 7 deletions ansible/roles/rad_setup_instructlab/tasks/50-dev-tools-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,24 +108,40 @@
dest: "/home/{{ setup_instructlab_user }}/.config/Code/User/settings.json"
mode: u=rw,g=rw,o=

- name: Create a new directory [dev-guides]
file:
path: "/home/{{ setup_instructlab_user }}/dev-guides"
state: directory
mode: 0755

- name: Clone dev-guides repository
git:
repo: https://github.com/rh-rad-ai-roadshow/dev-guides.git
dest: "/home/{{ setup_instructlab_user }}/"
dest: "/home/{{ setup_instructlab_user }}/dev-guides"

- name: Change owner of the dev-guides directory
file:
path: "/home/{{ setup_instructlab_user }}/dev-guides"
recurse: true
mode: 0755


- name: Update the naviagation config
ansible.builtin.copy:
src: antora.yml
dest: "/home/{{ setup_instructlab_user }}/dev-guides/content/antora.yml"
mode: u=rw,g=rw,o=

- name: Build and start the lab instructions for Desktop labs
shell: "sh /home/{{ setup_instructlab_user }}/dev-guides/utilities/lab-desktop-start"

- name: Set the env-desktop environment variable to true for Desktop labs
agnosticd_user_info:
data:
env-desktop: true

- 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"

become: true
become_user: "{{ setup_instructlab_user }}"

0 comments on commit 01ce35c

Please sign in to comment.